120 double center_y,
double center_z);
130 void Remesh(
double ele_size);
161 bool use_prescribed_vx,
bool use_prescribed_vy,
162 bool use_prescribed_vz);
171 void Solve(
double dt);
181 void SaveAsVTK(std::string
const &file_name);
261 double pressure,
Vec3d const &v0,
A class that simulates a membrane.
Definition membrane.hpp:15
double radius
The radius of the membrane.
Definition membrane.hpp:18
~Membrane()
Destroys the Membrane object.
Definition membrane.cpp:224
double density
Material properties of the membrane.
Definition membrane.hpp:41
void InitMesh()
Initializes the mesh used to represent the membrane.
Definition membrane.cpp:226
void Remesh(double ele_size)
Remeshes the membrane.
Definition membrane.cpp:28
VecXT< Vec3d > nodal_vels
Nodal velocities for each node in the mesh (used for updating motion using a lumped mass approach).
Definition membrane.hpp:67
void Solve(double dt)
Solves the membrane motion for a given timestep.
Definition membrane.cpp:47
void Advance(double dt)
Advances the membrane motion for a given timestep.
Definition membrane.cpp:59
double damp_coef
Damping coefficient for the membrane motion.
Definition membrane.hpp:47
void InitInitialCondition()
Initializes the initial conditions for the simulation.
Definition membrane.cpp:268
VecXT< VecNT< double, 6 > > bc_nodal_vels
Nodal velocities for the boundary conditions. The last three elements indicate if prescribed velociti...
Definition membrane.hpp:77
VecXT< Vec3d > nodes
Triangle mesh representing the membrane: nodes.
Definition membrane.hpp:53
double neo_mu
Material properties of the membrane (neo-Hookean material model).
Definition membrane.hpp:38
double mesh_size
The size of the elements in the mesh used to represent the membrane.
Definition membrane.hpp:24
VecXT< double > nodal_vols
Nodal volumes for each node in the mesh (used for updating motion using a lumped mass approach).
Definition membrane.hpp:63
VecXT< Vec3d > bc_facet_forces
Facet forces for the boundary conditions.
Definition membrane.hpp:73
double timestep
Timestep for the simulation.
Definition membrane.hpp:50
double ref_ele_area
Reference area of each element.
Definition membrane.hpp:196
Membrane(double radius, double height)
Constructs a new Membrane object with the given radius and height.
Definition membrane.cpp:10
double height
The height of the membrane.
Definition membrane.hpp:21
VecXT< Vec3d > elemental_stress
Elemental stress tensor for each element in the mesh.
Definition membrane.hpp:59
VecXT< Vec3i > elements
Triangle mesh representing the membrane: elements.
Definition membrane.hpp:56
void Init()
Initializes the membrane.
Definition membrane.cpp:33
VecXT< Vec3d > nodal_forces_ext
Nodal external forces.
Definition membrane.hpp:202
double neo_k
Material properties of the membrane (neo-Hookean material model).
Definition membrane.hpp:35
double thickness
Material properties of the membrane.
Definition membrane.hpp:44
double ref_ele_width
Reference width and height of each element.
Definition membrane.hpp:193
Vec3d center
The center of the membrane.
Definition membrane.hpp:27
void SetBCNodalVelocity(int nid, double vx, double vy, double vz, bool use_prescribed_vx, bool use_prescribed_vy, bool use_prescribed_vz)
Sets the nodal velocity and boundary condition for a given node.
Definition membrane.cpp:35
double ref_ele_height
Definition membrane.hpp:193
Mat2d GetDeformationGradient(Vec3d const &v0, Vec3d const &v1, Vec3d const &v2)
Calculates the deformation gradient tensor for an element.
Definition membrane.cpp:301
VecXT< Vec3d > nodal_forces_int
Nodal internal forces.
Definition membrane.hpp:199
Mat2d GetCauchyStress(Mat2d const &def_grad)
Calculates the Cauchy stress tensor for an element.
Definition membrane.cpp:322
VecXT< double > bc_facet_pressure
Facet pressures for the boundary conditions.
Definition membrane.hpp:70
std::tuple< Mat3d, Mat3d > GetGlobalForces(Mat2d const &cauchy_stress, double pressure, Vec3d const &v0, Vec3d const &v1, Vec3d const &v2)
Calculates the global internal and external forces acting on an element.
Definition membrane.cpp:344
void SaveAsVTK(std::string const &file_name)
Saves the current state of the membrane as a VTK file.
Definition membrane.cpp:142
Definition bond_entry.hpp:7
std::vector< T > VecXT
Definition utils_macros.hpp:31
std::array< double, 3 > Vec3d
Definition utils_macros.hpp:18
std::array< std::array< double, 2 >, 2 > Mat2d
Definition utils_macros.hpp:21