Skip to content

Commit

Permalink
Merge branch 'update_kw_ex' into 'main'
Browse files Browse the repository at this point in the history
Update KW example run details

See merge request 5t2/CabanaPD!47
  • Loading branch information
streeve committed Sep 16, 2022
2 parents 8568f86 + 3307ded commit f12c233
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions examples/kalthoff_winkler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@ int main( int argc, char* argv[] )
double thickness = 0.009; // [m] ( 9 mm)

// Domain
std::array<int, 3> num_cell = { 41, 81, 4 };
// This is a relatively large example for CPU - reduce the number of
// cells and increase delta if needed. Note this is also a relatively
// small example for GPU.
std::array<int, 3> num_cell = { 151, 301, 14 };
std::array<double, 3> low_corner = { -0.5 * height, -0.5 * width,
-0.5 * thickness };
std::array<double, 3> high_corner = { 0.5 * height, 0.5 * width,
0.5 * thickness };
double t_final = 140e-6;
double dt = 0.2e-6;
double t_final = 70e-6;
double dt = 0.133e-6;
int output_frequency = 10;

// Material constants
Expand All @@ -51,7 +54,7 @@ int main( int argc, char* argv[] )
double K = E / ( 3.0 * ( 1.0 - 2.0 * nu ) ); // [Pa]
double rho0 = 8000; // [kg/m^3]
double G0 = 42408; // [J/m^2]
double G = E / ( 2.0 * ( 1.0 + nu ) );
// double G = E / ( 2.0 * ( 1.0 + nu ) ); // Only for LPS.

double v0 = 16; // [m/sec] (Half impactor's velocity)
double L_prenotch = 0.05; // [m] (50 mm)
Expand All @@ -67,14 +70,14 @@ int main( int argc, char* argv[] )
p02 };
CabanaPD::Prenotch<2> prenotch( v1, v2, notch_positions );

double delta = 0.0075;
double delta = 0.0020000001;
int m = std::floor(
delta / ( ( high_corner[0] - low_corner[0] ) / num_cell[0] ) );
int halo_width = m + 1; // Just to be safe.

// Choose force model type.
// CabanaPD::PMBDamageModel force_model( delta, K, G0 );
CabanaPD::LPSDamageModel force_model( delta, K, G, G0 );
CabanaPD::PMBDamageModel force_model( delta, K, G0 );
// CabanaPD::LPSDamageModel force_model( delta, K, G, G0 );
CabanaPD::Inputs inputs( num_cell, low_corner, high_corner, t_final, dt,
output_frequency );
inputs.read_args( argc, argv );
Expand Down

0 comments on commit f12c233

Please sign in to comment.