38#include "meshes/quarter_circle_sector_mesh.h"
68 const Vector<double> &n, Vector<double> &traction)
70 unsigned dim = traction.size();
71 for(
unsigned i=0;i<dim;i++)
73 traction[i] = -
P*n[i];
99template <
class ELEMENT>
101 public virtual RefineableQuarterCircleSectorMesh<ELEMENT>,
102 public virtual SolidMesh
126 "Element needs to be derived from SolidFiniteElement\n",
144 traction_mesh_pt=
new SolidMesh;
170 traction_mesh_pt->flush_element_and_node_storage();
206template<
class ELEMENT,
class TIMESTEPPER>
281template<
class ELEMENT,
class TIMESTEPPER>
314 unsigned nnod0=solid_mesh_pt()->nboundary_node(0);
315 unsigned nnod1=solid_mesh_pt()->nboundary_node(1);
319 Trace_node_pt[
j]=solid_mesh_pt()->boundary_node_pt(0,
j);
323 Trace_node_pt[
j+
nnod0]=solid_mesh_pt()->boundary_node_pt(1,
j);
343 solid_mesh_pt()->max_permitted_error()=0.006;
344 solid_mesh_pt()->min_permitted_error()=0.0006;
345 solid_mesh_pt()->doc_adaptivity_targets(
cout);
348 unsigned n_bottom = solid_mesh_pt()->nboundary_node(0);
353 solid_mesh_pt()->boundary_node_pt(0,
i)->pin_position(1);
357 unsigned n_side = solid_mesh_pt()->nboundary_node(2);
361 solid_mesh_pt()->boundary_node_pt(2,
i)->pin_position(0);
365 unsigned n_element =solid_mesh_pt()->nelement();
374 el_pt->constitutive_law_pt() =
378 el_pt->enable_inertia();
386 n_element=traction_mesh_pt()->nelement();
394 (traction_mesh_pt()->element_pt(
i));
422 solid_mesh_pt()->set_lagrangian_nodal_coordinates();
435template<
class ELEMENT,
class TIMESTEPPER>
445 unsigned n_element=traction_mesh_pt()->nelement();
453 (traction_mesh_pt()->element_pt(
i));
473template<
class ELEMENT,
class TIMESTEPPER>
491 unsigned nel=traction_mesh_pt()->nelement();
499 for (
unsigned e=0;
e<
nel;
e++)
507 traction_mesh_pt()->finite_element_pt(
e));
519 doc_displ_and_veloc();
526 unsigned nelem=solid_mesh_pt()->nboundary_element(0);
551 (solid_mesh_pt()->boundary_element_pt(0,
e));
564 <<
dxdt[0] << std::endl;
572 Trace_file <<
time_pt()->time() <<
" ";
576 Trace_file <<
sqrt(
pow(Trace_node_pt[
j]->
x(0),2)+
577 pow(Trace_node_pt[
j]->
x(1),2)) <<
" ";
579 Trace_file << std::endl;
594 cout <<
"Doced solution for step "
596 << std::endl << std::endl << std::endl;
612template<
class ELEMENT,
class TIMESTEPPER>
628 Doc_info.directory().c_str(),Doc_info.number());
633 Doc_info.directory().c_str(),Doc_info.number());
638 Doc_info.directory().c_str(),Doc_info.number());
645 unsigned nel=solid_mesh_pt()->nelement();
646 for (
unsigned e=0;
e<
nel;
e++)
689template<
class ELEMENT,
class TIMESTEPPER>
701template<
class ELEMENT,
class TIMESTEPPER>
713template<
class ELEMENT,
class TIMESTEPPER>
729 Doc_info.set_directory(
dirname);
741 unsigned nnod0=solid_mesh_pt()->nboundary_node(0);
742 unsigned nnod1=solid_mesh_pt()->nboundary_node(1);
743 Trace_file <<
"VARIABLES=\"time\"";
746 Trace_file <<
", \"radial node " <<
j <<
"\" ";
750 Trace_file <<
", \"azimuthal node " <<
j <<
"\" ";
752 Trace_file << std::endl;
860 <<
": Pure displacement formulation" << std::endl;
869 <<
": Pressure/displacement with Crouzeix-Raviart pressure" << std::endl;
880 <<
": Pressure/displacement with Taylor-Hood pressure" << std::endl;
"Shock" wave propagates through an impulsively loaded circular disk.
SolidMesh * Traction_mesh_pt
Pointer to mesh of traction elements.
void dump_it(ofstream &dump_file)
Dump problem-specific parameters values, then dump generic problem data.
void actions_after_newton_solve()
Update function (empty)
void actions_before_newton_solve()
Update function (empty)
ElasticRefineableQuarterCircleSectorMesh< ELEMENT > * Solid_mesh_pt
Pointer to solid mesh.
ElasticRefineableQuarterCircleSectorMesh< ELEMENT > *& solid_mesh_pt()
Access function for the solid mesh.
void doc_displ_and_veloc(const int &stage=0)
Doc displacement and velocity: label file with before and after.
void doc_solution()
Doc the solution.
Vector< Node * > Trace_node_pt
Vector of pointers to nodes whose position we're tracing.
ofstream Trace_file
Trace file.
SolidMesh *& traction_mesh_pt()
Access function for the mesh of surface traction elements.
void actions_after_adapt()
Actions after adaption: Kill and then re-build the traction elements on boundary 1 and re-assign the ...
DiskShockWaveProblem()
Constructor:
void restart(ifstream &restart_file)
Read problem-specific parameter values, then recover generic problem data.
void run(const unsigned &case_number)
Run the problem; specify case_number to label output directory.
Elastic quarter circle sector mesh with functionality to attach traction elements to the curved surfa...
ElasticRefineableQuarterCircleSectorMesh(GeomObject *wall_pt, const double &xi_lo, const double &fract_mid, const double &xi_hi, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Build mesh and copy Eulerian coords to Lagrangian ones so that the initial configuration...
void remake_traction_element_mesh(SolidMesh *&traction_mesh_pt)
Function to wipe and re-create mesh made of traction elements.
void make_traction_element_mesh(SolidMesh *&traction_mesh_pt)
Function to create mesh made of traction elements.
void constant_pressure(const Vector< double > &xi, const Vector< double > &x, const Vector< double > &n, Vector< double > &traction)
Constant pressure load.
double P
Uniform pressure.
ConstitutiveLaw * Constitutive_law_pt
Pointer to constitutive law.
double Nu
Poisson's ratio.
int main(int argc, char *argv[])
Driver for simple elastic problem.