chrono::fea::ChNodeFEAxyzP Class Reference

Description

Class for a generic finite element node in 3D space, with scalar field P.

This can be used for typical Poisson-type problems (ex. thermal, if the scalar field is temperature T, or electrostatics if the scalar field is electric potential V)

#include <ChNodeFEAxyzP.h>

Inheritance diagram for chrono::fea::ChNodeFEAxyzP:
Collaboration diagram for chrono::fea::ChNodeFEAxyzP:

Public Member Functions

 ChNodeFEAxyzP (ChVector<> initial_pos=VNULL)
 
 ChNodeFEAxyzP (const ChNodeFEAxyzP &other)
 
ChNodeFEAxyzPoperator= (const ChNodeFEAxyzP &other)
 
virtual ChVariablesVariables ()
 
virtual void Relax () override
 Set the rest position as the actual position.
 
virtual void SetNoSpeedNoAcceleration () override
 Reset to no speed and acceleration.
 
virtual void SetFixed (bool mev) override
 Set the 'fixed' state of the node. More...
 
virtual bool GetFixed () override
 Get the 'fixed' state of the node. More...
 
const ChVectorGetPos () const
 Position of the node - in absolute csys.
 
void SetPos (const ChVector<> &mpos)
 Position of the node - in absolute csys.
 
void SetP (double mp)
 Set the scalar field at node.
 
double GetP () const
 Get the scalar field at node.
 
void SetP_dt (double mp)
 Set the scalar field time derivative at node.
 
double GetP_dt () const
 Get the scalar field time derivative at node.
 
void SetF (double mf)
 Set the applied term (right hand term in Poisson formulations).
 
double GetF () const
 Get the applied term (right hand term in Poisson formulations).
 
double GetMass ()
 Get mass of the node. More...
 
void SetMass (double mm)
 Set mass of the node. More...
 
virtual int Get_ndof_x () const override
 Get the number of degrees of freedom.
 
virtual void NodeIntStateGather (const unsigned int off_x, ChState &x, const unsigned int off_v, ChStateDelta &v, double &T) override
 
virtual void NodeIntStateScatter (const unsigned int off_x, const ChState &x, const unsigned int off_v, const ChStateDelta &v, const double T) override
 
virtual void NodeIntStateGatherAcceleration (const unsigned int off_a, ChStateDelta &a) override
 
virtual void NodeIntStateScatterAcceleration (const unsigned int off_a, const ChStateDelta &a) override
 
virtual void NodeIntLoadResidual_F (const unsigned int off, ChVectorDynamic<> &R, const double c) override
 
virtual void NodeIntLoadResidual_Mv (const unsigned int off, ChVectorDynamic<> &R, const ChVectorDynamic<> &w, const double c) override
 
virtual void NodeIntToDescriptor (const unsigned int off_v, const ChStateDelta &v, const ChVectorDynamic<> &R) override
 
virtual void NodeIntFromDescriptor (const unsigned int off_v, ChStateDelta &v) override
 
virtual void InjectVariables (ChSystemDescriptor &mdescriptor) override
 Tell to a system descriptor that there are variables of type ChVariables in this object (for further passing it to a solver)
 
virtual void VariablesFbReset () override
 Sets the 'fb' part (the known term) of the encapsulated ChVariables to zero.
 
virtual void VariablesFbLoadForces (double factor=1) override
 Adds the current forces (applied to node) into the encapsulated ChVariables, in the 'fb' part: qf+=forces*factor.
 
virtual void VariablesQbLoadSpeed () override
 Initialize the 'qb' part of the ChVariables with the current value of speeds. More...
 
virtual void VariablesQbSetSpeed (double step=0) override
 Fetches the item speed (ex. More...
 
virtual void VariablesFbIncrementMq () override
 Adds M*q (masses multiplied current 'qb') to Fb, ex. More...
 
virtual void VariablesQbIncrementPosition (double step) override
 Increment node positions by the 'qb' part of the ChVariables, multiplied by a 'step' factor. More...
 
virtual void ArchiveOUT (ChArchiveOut &marchive) override
 
virtual void ArchiveIN (ChArchiveIn &marchive) override
 Method to allow de serialization of transient data from archives.
 
- Public Member Functions inherited from chrono::fea::ChNodeFEAbase
virtual void SetIndex (unsigned int mindex)
 Sets the global index of the node.
 
virtual unsigned int GetIndex ()
 Gets the global index of the node.
 
- Public Member Functions inherited from chrono::ChNodeBase
 ChNodeBase (const ChNodeBase &other)
 
ChNodeBaseoperator= (const ChNodeBase &other)
 
virtual int Get_ndof_w () const
 Get the number of degrees of freedom, derivative This might be different from ndof if quaternions are used for rotations, as derivative might be angular velocity. More...
 
unsigned int NodeGetOffset_x ()
 Get offset in the state vector (position part)
 
unsigned int NodeGetOffset_w ()
 Get offset in the state vector (speed part)
 
void NodeSetOffset_x (const unsigned int moff)
 Set offset in the state vector (position part)
 
void NodeSetOffset_w (const unsigned int moff)
 Set offset in the state vector (speed part)
 
virtual void NodeIntStateIncrement (const unsigned int off_x, ChState &x_new, const ChState &x, const unsigned int off_v, const ChStateDelta &Dv)
 

Additional Inherited Members

- Public Attributes inherited from chrono::fea::ChNodeFEAbase
double m_TotalMass
 Nodal mass obtained from element masss matrix.
 
- Protected Attributes inherited from chrono::fea::ChNodeFEAbase
unsigned int g_index
 global node index
 
- Protected Attributes inherited from chrono::ChNodeBase
unsigned int offset_x
 offset in vector of state (position part)
 
unsigned int offset_w
 offset in vector of state (speed part)
 

Member Function Documentation

virtual bool chrono::fea::ChNodeFEAxyzP::GetFixed ( )
overridevirtual

Get the 'fixed' state of the node.

If true, its current field value is not changed by solver.

Implements chrono::fea::ChNodeFEAbase.

double chrono::fea::ChNodeFEAxyzP::GetMass ( )

Get mass of the node.

Not meaningful except for transients. Meaning of 'mass' changes depending on the problem type.

virtual void chrono::fea::ChNodeFEAxyzP::SetFixed ( bool  mev)
overridevirtual

Set the 'fixed' state of the node.

If true, its current field value is not changed by solver.

Implements chrono::fea::ChNodeFEAbase.

void chrono::fea::ChNodeFEAxyzP::SetMass ( double  mm)

Set mass of the node.

Not meaningful except for transients. Meaning of 'mass' changes depending on the problem type.

void chrono::fea::ChNodeFEAxyzP::VariablesFbIncrementMq ( )
overridevirtual

Adds M*q (masses multiplied current 'qb') to Fb, ex.

if qb is initialized with v_old using VariablesQbLoadSpeed, this method can be used in timestepping schemes that do: M*v_new = M*v_old + forces*dt

Reimplemented from chrono::ChNodeBase.

void chrono::fea::ChNodeFEAxyzP::VariablesQbIncrementPosition ( double  step)
overridevirtual

Increment node positions by the 'qb' part of the ChVariables, multiplied by a 'step' factor.

pos+=qb*step

If qb is a speed, this behaves like a single step of 1-st order numerical integration (Eulero integration).

Reimplemented from chrono::ChNodeBase.

void chrono::fea::ChNodeFEAxyzP::VariablesQbLoadSpeed ( )
overridevirtual

Initialize the 'qb' part of the ChVariables with the current value of speeds.

Reimplemented from chrono::ChNodeBase.

void chrono::fea::ChNodeFEAxyzP::VariablesQbSetSpeed ( double  step = 0)
overridevirtual

Fetches the item speed (ex.

linear velocity, in xyz nodes) from the 'qb' part of the ChVariables and sets it as the current item speed. If 'step' is not 0, also should compute the approximate acceleration of the item using backward differences, that is accel=(new_speed-old_speed)/step. Mostly used after the solver provided the solution in ChVariables.

Reimplemented from chrono::ChNodeBase.