#include <tutorial/microhydro/MicroHydroModule.h>
Public Member Functions | |
| MicroHydroModule (const ModuleBuildInfo &mbi) | |
| ~MicroHydroModule () | |
| virtual void | hydroStartInit () |
| virtual void | computePressureForce () |
| virtual void | computeVelocity () |
| virtual void | applyBoundaryCondition () |
| virtual void | moveNodes () |
| virtual void | computeGeometricValues () |
| virtual void | updateDensity () |
| virtual void | applyEquationOfState () |
| virtual void | computeDeltaT () |
| virtual VersionInfo | versionInfo () const |
Represents a highly simplified Lagrangian hydrodynamics module:
The list of operations performed by the module is as follows:
Definition at line 30 of file MicroHydroModule.h.
|
inline |
Class constructor
Definition at line 35 of file MicroHydroModule.h.
|
inline |
Class destructor
Definition at line 38 of file MicroHydroModule.h.
|
virtual |
Applies the boundary conditions. Boundary conditions depend on the dataset options. In this implementation, a boundary condition has the following properties:
Applying boundary conditions therefore consists of fixing a component of a velocity vector for every node of every face of every surface on which a boundary condition is imposed.
Definition at line 86 of file MicroHydroModule.cc.
References ENUMERATE_FACE, Arcane::ItemWithNodes::nbNode(), Arcane::ItemWithNodes::node(), TypesMicroHydro::Unknown, TypesMicroHydro::VelocityX, TypesMicroHydro::VelocityY, TypesMicroHydro::VelocityZ, Arcane::Real3POD::x, Arcane::Real3POD::y, and Arcane::Real3POD::z.
|
virtual |
This entry point calculates the internal energy, pressure, and speed of sound within the cell by calling the equation of state service.
Definition at line 215 of file MicroHydroModule.cc.
References ENUMERATE_CELL.
|
virtual |
Determines the time step value for the next iteration. The time step is constrained by:
deltatMin() and deltatMax() values of the dataset,finalTime()). Definition at line 236 of file MicroHydroModule.cc.
References ENUMERATE_CELL, and Arcane::Parallel::ReduceMin.
|
virtual |
This entry point groups all the geometric calculations useful for the scheme. In our case, this involves for each cell:
To optimize the calculation (cache usage), during each iteration on a cell, the coordinates of its nodes and those of the center of its faces are stored locally.
Definition at line 141 of file MicroHydroModule.cc.
References Arcane::Real3::abs(), ENUMERATE_CELL, Arcane::ItemWithNodes::nodes(), and Arcane::math::scaMul().
Referenced by hydroStartInit().
|
virtual |
Calculates the contribution of pressure forces per node at the current time \(t^{n}\). For each node of each cell, this is the pressure multiplied by the resultant force at that node. Calculates the pressure forces at the current time \(t^{n}\).
Definition at line 48 of file MicroHydroModule.cc.
References ENUMERATE_CELL, and Arcane::ItemWithNodes::nodes().
|
virtual |
Calculates the force (m_force) applied to the nodes by adding the possible contribution of pseudo-viscosity. Then calculates the new velocity (m_velocity) at the nodes.
Definition at line 67 of file MicroHydroModule.cc.
References ENUMERATE_NODE.
|
virtual |
Initializes the module. The initialization consists of two distinct parts:
m_cell_cqs and m_viscosity_force, both of which are cell variables possessing a value for every node of every cell. Since we only support hexahedrons, there are 8 values per cell,Pressure, Density, and AdiabaticCst, ARCANE initializes them directly from the dataset. The NodeCoord variable is also initialized by the architecture when reading the mesh. The other variables are calculated as follows:Definition at line 13 of file MicroHydroModule.cc.
References computeGeometricValues(), ENUMERATE_CELL, and Arcane::ItemWithNodes::nodes().
|
virtual |
Modifies the coordinates (m_node_coord) of the nodes based on the velocity vector and the time step.
Definition at line 128 of file MicroHydroModule.cc.
References ENUMERATE_NODE.
|
virtual |
Calculates the new value of the cell density, assuming that the mass of a cell is constant over time. In this case, the new density is equal to the mass divided by the new volume.
Definition at line 199 of file MicroHydroModule.cc.
References ENUMERATE_CELL.
|
inlinevirtual |
Returns the version number of the module
Definition at line 142 of file MicroHydroModule.h.