Go to the documentation of this file.
20 const dynamicFvMesh&
mesh,
43 volVectorField& cellDisp =
44 const_cast<volVectorField&
>(
mesh_.thisDb().lookupObject<volVectorField>(
"cellDisplacement"));
46 scalar dT =
mesh_.time().deltaT().value();
54 scalar ym =
y0_ + 0.5 * dT *
V0_;
65 label patchI =
mesh_.boundaryMesh().findPatchID(patchName);
67 forAll(cellDisp.boundaryField()[patchI], faceI)
69 cellDisp.boundaryFieldRef()[patchI][faceI] =
y_ *
direction_;
76 Info <<
"Time: " <<
t_ <<
" yForce: " << yForce <<
" y: " <<
y_ <<
" V: " <<
V_ << endl;
scalar V_
velocity for the current step
forAll(pseudoP.boundaryField(), patchI)
scalar y_
location for the current step
scalar t_
the simulation time based on dT and it should be same as the runtime
const dynamicFvMesh & mesh_
fvMesh
scalar y0_
location from the previous step
DAOption daOption(mesh, pyOptions_)
scalar forceScale_
scaling factor for force
virtual void correct()
update the cell displacement
DAMotionTranslationCoupled(const dynamicFvMesh &mesh, const DAOption &daOption)
const DAOption & daOption_
DAOption object.
const dictionary & getAllOptions() const
return a reference of allOptions_ dictionary
scalar C_
spring damping coefficient
wordList patchNames_
patch names for the moving body
scalar M_
mass of the object
vector getForce(const dynamicFvMesh &mesh)
calculate the force
scalar K_
spring stiffness constant
scalar V0_
velocity from the previous step
defineTypeNameAndDebug(DAFvSource, 0)
addToRunTimeSelectionTable(DAFvSource, DAFvSourceActuatorDisk, dictionary)
vector direction_
spring oscillation direction