|
IFEM
90A354
|
Newmark-based solution driver for dynamic isogeometric FEM simulators. More...
#include <HHTSIM.h>


Public Member Functions | |
| HHTSIM (SIMbase &sim) | |
| The constructor initializes default solution parameters. | |
| virtual | ~HHTSIM () |
| The destructor deletes the Finert and Fext vectors. | |
| virtual bool | parse (const tinyxml2::XMLElement *elem) |
| Parses a data section from an XML document. | |
| virtual void | printProblem (bool stopInputTimer=false) const |
| Prints out problem-specific data to the log stream. More... | |
| virtual void | initPrm () |
| Initializes time integration parameters for the integrand. | |
| virtual void | initSol (size_t nSol, size_t nDof=0) |
| Initializes the primary solution vectors. | |
| virtual void | setSolution (const RealArray &newSol, int idx) |
| Modifies the current solution vector (used by sub-iterations only). | |
| virtual bool | isLinear () const |
| Returns whether this solution driver is linear or not. | |
| virtual bool | serialize (SerializeMap &data) const |
| Serialize solution vectors for restarting purposes. More... | |
| virtual bool | deSerialize (const SerializeMap &data) |
| Set solution vectors from a serialized state. More... | |
| virtual bool | parse (const tinyxml2::XMLElement *elem) |
| Parses a data section from an XML document. | |
Public Member Functions inherited from NewmarkSIM | |
| NewmarkSIM (SIMbase &sim) | |
| The constructor initializes default solution parameters. | |
| bool | initAcc (double zero_tolerance=1.0e-8, std::streamsize outPrec=0) |
| Calculates initial accelerations. | |
| virtual bool | advanceStep (TimeStep ¶m, bool updateTime=true) |
| Advances the time step one step forward. | |
| virtual SIM::ConvStatus | solveStep (TimeStep ¶m, SIM::SolutionMode=SIM::STATIC, double zero_tolerance=1.0e-8, std::streamsize outPrec=0) |
| Solves the dynamic equations by a predictor/multi-corrector method. More... | |
| SIM::ConvStatus | solveIteration (TimeStep ¶m) |
| Solves the linearized system of current iteration. More... | |
| int | getMaxit () const |
| Returns the maximum number of iterations. | |
| virtual bool | isDynamic () const |
| Returns whether this is a dynamic solution driver or not. | |
| const Vector & | getVelocity () const |
| Returns a const reference to current velocity vector. | |
| const Vector & | getAcceleration () const |
| Returns a const reference to current velocity vector. | |
| bool | saveStep (int iStep, TimeStep ¶m) |
| Saves the converged solution to VTF file for a given time step. More... | |
| virtual void | dumpResults (double time, utl::LogStream &os, std::streamsize precision=3, bool formatted=true) const |
| Dumps solution variables at user-defined points. More... | |
| virtual bool | parse (const tinyxml2::XMLElement *elem) |
| Parses a data section from an XML document. More... | |
| virtual bool | parse (char *keyWord, std::istream &is) |
| Parses a data section from an input stream. | |
| virtual bool | parse (const tinyxml2::XMLElement *elem) |
| Parses a data section from an XML document. | |
| bool | saveStep (int iStep, double time, const char *vecName=nullptr) |
| Saves the converged solution to VTF file of a given time/load step. More... | |
| bool | saveStep (int iStep, int &rBlock, double time, const char *vecName=nullptr) |
| Saves the converged solution to VTF file of a given time/load step. More... | |
| bool | saveStep (int iStep, int &rBlock, const char *vecName) |
| Saves the converged solution to VTF file of a given time/load step. More... | |
Public Member Functions inherited from MultiStepSIM | |
| virtual const char ** | getPrioritizedTags () const |
| Returns a list of prioritized XML-tags. | |
| bool | initEqSystem (bool withRF=true, size_t nScl=0) |
| Allocates the FE system matrices. More... | |
| virtual bool | preprocess (const std::vector< int > &ignored, bool fixDup) |
| Performs some pre-processing tasks on the FE model. More... | |
| void | setStartGeo (int gID) |
| Initializes the geometry block counter. | |
| bool | saveModel (const char *fileName) |
| Opens a new VTF-file and writes the model geometry to it. More... | |
| bool | saveModel (int &gBlock, int &rBlock, const char *fileName=nullptr, bool clearG=true) |
| Opens a new VTF-file and writes the model geometry to it. More... | |
| bool | saveModel (int &gBlock, int &rBlock, double time) |
| Writes the model geometry and BCs to an already opened VTF-file. More... | |
| bool | saveStep (int iStep, double time, const char *vecName=nullptr) |
| Saves the converged solution to VTF file of a given time/load step. More... | |
| bool | saveStep (int iStep, int &rBlock, double time, const char *vecName=nullptr) |
| Saves the converged solution to VTF file of a given time/load step. More... | |
| bool | saveStep (int iStep, int &rBlock, const char *vecName) |
| Saves the converged solution to VTF file of a given time/load step. More... | |
| bool | checkForRestart () |
| Restores the solution from a serialized state in case of restart. | |
| void | dumpStep (int iStep, double time, utl::LogStream &os, bool withID=true) const |
| Dumps the primary solution for inspection. More... | |
| bool | hasPointResultFile () const |
| Returns whether a points result file has been defined or not. | |
| bool | savePoints (double time, int step) const |
| Saves point-wise solution to file for a given time/load step. More... | |
| const SIMoutput & | getModel () const |
| Returns a const reference to the FE model. | |
| void | setSubIteration (SubIt flag) |
| Updates the sub-iteration flag. | |
| SubIt | getSubIteration () const |
| Returns the sub-iteration flag. | |
| virtual size_t | numSolution () const |
| Returns the number of solution vectors. | |
| virtual const Vector & | realSolution (int i=0) const |
| Returns a const reference to the current real solution vector. More... | |
| virtual const Vectors & | realSolutions (bool=false) |
| Returns a const reference to the current real solution vectors. More... | |
| double * | theRefNorm () |
| Returns a pointer to the reference norm variable. | |
| const double * | getRefNorm () const |
| Returns a const pointer to the reference norm variable. | |
| virtual bool | parse (char *keyWord, std::istream &is) |
| Parses a data section from an input stream. | |
| virtual bool | parse (const tinyxml2::XMLElement *elem) |
| Parses a data section from an XML document. | |
Public Member Functions inherited from SIMsolution | |
| virtual const Vectors & | getSolutions () const |
| Returns a const reference to the solution vectors. | |
| virtual Vectors & | theSolutions () |
| Returns a reference to the solution vectors (for assignment). | |
| virtual const Vector & | getSolution (int ix=0) const |
| Returns a const reference to current solution vector. | |
Public Member Functions inherited from SIMadmin | |
| virtual | ~SIMadmin () |
| Empty destructor. | |
| virtual bool | read (const char *fileName) |
| Reads model data from the specified input file *fileName. | |
| virtual bool | parse (char *keyWord, std::istream &is) |
| Parses a data section from an input stream. | |
| virtual bool | preprocessC (const IntVec &, bool, double=0.0) |
| Performs some pre-processing tasks on the FE model. | |
| const ProcessAdm & | getProcessAdm () const |
| Returns the parallel process administrator. | |
| int | getGlobalProcessID () const |
| Returns the global process ID. More... | |
| const std::string & | getHeading () const |
| Returns the simulator heading. | |
| void | setHeading (const std::string &heading) |
| Defines the simulator heading. | |
| void | printHeading (int &supStep) const |
| Prints the heading of this simulator, if any, to IFEM::cout. | |
Public Member Functions inherited from XMLInputBase | |
| bool | readXML (const char *fileName, bool verbose=true) |
| Reads an XML input file. More... | |
| bool | loadXML (const char *xml) |
| Loads data from an XML-formatted text string. More... | |
Protected Member Functions | |
| virtual bool | predictStep (TimeStep ¶m) |
| Calculates predicted velocities and accelerations. | |
| virtual bool | correctStep (TimeStep ¶m, bool converged) |
| Updates configuration variables (solution vector) in an iteration. | |
| virtual void | finalizeRHSvector (bool predicting) |
| Finalizes the right-hand-side vector on the system level. More... | |
Protected Member Functions inherited from NewmarkSIM | |
| virtual bool | solutionNorms (const TimeDomain &, double zero_tolerance=1.0e-8, std::streamsize outPrec=0) |
| Computes and prints some solution norm quantities. More... | |
| virtual SIM::ConvStatus | checkConvergence (TimeStep ¶m) |
| Checks whether the corrector iterations have converged or diverged. | |
Protected Member Functions inherited from MultiStepSIM | |
| MultiStepSIM (SIMbase &sim) | |
| The constructor initializes the FE model reference. More... | |
| void | printStep (const TimeStep ¶m) const |
| Prints out time/load step identification. More... | |
| int | getLastSavedStep () const |
| Returns the last step that was saved to VTF. | |
Protected Member Functions inherited from SIMsolution | |
| SIMsolution ()=default | |
| The default constructor is protected to allow sub-classes only. | |
| virtual | ~SIMsolution ()=default |
| Empty default destructor. | |
| void | initSolution (size_t ndof, size_t nsol=1) |
| Initializes the solution vectors. More... | |
| void | pushSolution (unsigned short int nVecState=1) |
| Pushes the solution vector stack. More... | |
| bool | saveSolution (SerializeMap &data, const std::string &name) const |
| Writes current solution to a serialization container. More... | |
| bool | restoreSolution (const SerializeMap &data, const std::string &name) |
| Restores the solution from a serialization container. More... | |
Protected Member Functions inherited from SIMadmin | |
| SIMadmin (const char *heading=nullptr) | |
| The default constructor initializes the process administrator. | |
| SIMadmin (SIMadmin &anotherSIM) | |
| Copy constructor. | |
Protected Member Functions inherited from XMLInputBase | |
| const tinyxml2::XMLElement * | loadFile (tinyxml2::XMLDocument &doc, const char *fileName, bool verbose=false) |
| Loads an XML input file into a tinyxml2::XMLDocument object. More... | |
Private Attributes | |
| unsigned short int | pA |
| Index to predicted acceleration vector. | |
| unsigned short int | pV |
| Index to predicted velocity vector. | |
| Vector | incDis |
| Incremental displacement vector. | |
| SystemVector * | Finert |
| Actual inertia forces in last converged time step. | |
| SystemVector * | Fext |
| External force vector of previous time step. | |
Additional Inherited Members | |
Public Types inherited from MultiStepSIM | |
| enum | SubIt { ITER = 0 , FIRST = 1 , LAST = 2 , NONE = 3 } |
| Enum describing sub-iteration status. | |
Public Attributes inherited from SIMadmin | |
| SIMoptions & | opt |
| Simulation control parameters. | |
Static Public Attributes inherited from NewmarkSIM | |
| static const char * | inputContext = "newmarksolver" |
| Input file context for solver parameters. | |
Static Public Attributes inherited from SIMadmin | |
| static int | msgLevel = 2 |
| Controls the console output amount during solving. | |
Protected Types inherited from MultiStepSIM | |
| enum | NormOp { MAX , ALL } |
| Enum describing reference norm options. | |
Protected Types inherited from SIMsolution | |
| using | SerializeMap = std::map< std::string, std::string > |
| Convenience type. | |
Protected Types inherited from SIMadmin | |
| using | IntVec = std::vector< int > |
| Convenience alias. | |
Static Protected Member Functions inherited from SIMsolution | |
| static std::string | serialize (const double *v, size_t n) |
| Helper method for serializing a double array into a text string. More... | |
| static void | deSerialize (const std::string &data, double *v, size_t n) |
| Helper method for deserializing a double array from a text string. More... | |
Protected Attributes inherited from NewmarkSIM | |
| double | alpha1 |
| Mass-proportional damping parameter. | |
| double | alpha2 |
| Stiffness-proportional damping parameter. | |
| double | beta |
| Newmark time integration parameter. | |
| double | gamma |
| Newmark time integration parameter. | |
| bool | solveDisp |
| If true, use incremental displacements as unknowns. | |
| char | predictor |
| Predictor type flag. | |
| int | maxit |
| Maximum number of iterations in a time step. | |
| int | maxIncr |
| Maximum number of iterations with increasing norm. | |
| int | nupdat |
| Number of iterations with updated tangent. | |
| int | saveIts |
| Time step for which iteration result should be saved. | |
| char | saveVelAc |
| Flag the saving of velocity and acceleration to VTF. | |
| double | rTol |
| Relative convergence tolerance. | |
| double | aTol |
| Absolute convergence tolerance. | |
| double | divgLim |
| Relative divergence limit. | |
| unsigned short int | cNorm |
| Option for which convergence norm to use. | |
| std::string | factor_file |
| File for storage of factorized Newton matrix. | |
| bool | write_factor |
| If true, write new factorized Newton matrix. | |
| bool | read_factor |
| If true, read factorized Newton matrix. | |
| LinAlg::StorageFormat | fmt |
| Factorized Newton matrix storage format. | |
Protected Attributes inherited from MultiStepSIM | |
| SIMoutput & | model |
| The isogeometric FE model. | |
| Vector | loadVec |
| System load vector (for output to VTF) | |
| Vector | residual |
| Residual force vector. | |
| Vector | linsol |
| Linear solution vector. | |
| NormOp | refNopt |
| Reference norm option. | |
| double | refNorm |
| Reference norm value used in convergence checks. | |
| double | rCond |
| Reciprocal condition number of the linear equation system. | |
| SubIt | subiter |
| Sub-iteration flag. | |
| size_t | nRHSvec |
| Number of right-hand-side vectors to assemble. | |
| char | rotUpd |
| Option for how to update of nodal rotations. | |
| int | geoBlk |
| Running VTF geometry block counter. | |
| int | nBlock |
| Running VTF result block counter. | |
Protected Attributes inherited from SIMsolution | |
| Vectors | solution |
| Stack of solution vectors. | |
Protected Attributes inherited from SIMadmin | |
| ProcessAdm | adm |
| Parallel administrator. | |
| int | myPid |
| Processor ID in parallel simulations. | |
| int | nProc |
| Number of processors in parallel simulations. | |
| std::string | myHeading |
| Heading written before reading the input file. | |
Newmark-based solution driver for dynamic isogeometric FEM simulators.
This class implements the Hilber-Hughes-Taylor (HHT) time integration algorithm, with a constant displacement predictor step. The algorithm relies on the following three algorithm parameters:
αH = parameter defining the amount of numerical damping
α1 = mass-proportional damping factor
α2 = stiffness-proportional damping factor
For a given time discretization, t0 = 0 and tn = tn-1 + Δtn for n=1...nstep, the HHT time integration algorithm goes like this:
\[ \beta \;=\; \frac{1}{4}(1.0-\alpha_H)^2,\; \gamma \;=\; \frac{1}{2}-\alpha_H \]
\[ \begin{array}{lcll} t &=& 0 & \mbox{(initial time)} \\ {\bf u}_0 &=& {\bf 0} & \mbox{(initial displacements)} \\ \dot{\bf u}_0 &=& {\bf 0} & \mbox{(initial velocity)} \\ \ddot{\bf u}_0 &=& {\bf 0} & \mbox{(initial acceleration)} \\ \tilde{\bf R}_0 &=& {\bf 0} & \mbox{(initial actual inertia force)} \\ \end{array} \]
Initialisation of iteration loop:
\begin{eqnarray*} i &=& 0 \quad\mbox{(iteration counter)}\\ t &=& t + \Delta t_n \\ {\bf u}_n^0 &=& {\bf u}_{n-1} \\ \dot{\bf u}_n^0 &=& \dot{\bf u}_{n-1} \\ \ddot{\bf u}_n^0 &=& \ddot{\bf u}_{n-1} \\ \Delta{\bf u}_n &=& {\bf 0} \quad\mbox{(displacement increment)} \end{eqnarray*}
Predict new velocity and acceleration:
\begin{eqnarray*} {\bf v}_n &=& \frac{\gamma}{\beta}\dot{\bf u}_{n-1} + \Delta t_n(\frac{\gamma}{2\beta}-1)\ddot{\bf u}_{n-1} \\ {\bf a}_n &=& \frac{1}{2\beta}\ddot{\bf u}_{n-1} + \frac{1}{\Delta t_n\beta}\dot{\bf u}_{n-1} \end{eqnarray*}
Assemble FE matrices and right-hand-side force vectors:
\[ \begin{array}{lcll} {\bf K}_n^0 &=& {\bf K}({\bf u}_n^0,t) & \mbox{(tangential stiffness matrix)} \\ {\bf C}_n^0 &=& {\bf C}({\bf u}_n^0,t) & \mbox{(damping matrix)} \\ {\bf M}_n^0 &=& {\bf M}({\bf u}_n^0,t) & \mbox{(mass matrix)} \\ {\bf F}_n^{S,0} &=& {\bf F}^S({\bf u}_n^0,t) & \mbox{(internal stiffness forces)} \\ {\bf F}_n^{I,0} &=& {\bf F}^I({\bf u}_n^0,\ddot{\bf u}_n^0,t) & \mbox{(internal inertia forces)} \\ {\bf F}_n^{E,0} &=& {\bf F}^E({\bf u}_n^0,t) & \mbox{(external forces)} \end{array} \]
Compute Newton matrix and associated incremental load vector:
\begin{eqnarray*} {\bf N}_n^0 &=& a_n{\bf M}_n^0 + b_n{\bf C}_n^0 + c_n{\bf K}_n^0 \\ {\bf R}_n^0 &=& (1+\alpha_H)\left[{\bf F}_n^{E,0} - {\bf F}_{n-1}^E + (\alpha_1{\bf M}_n^0 + \alpha_2{\bf K}_n^0 + {\bf C}_n^0){\bf v}_n\right] + {\bf M}_n^0{\bf a}_n - {\bf F}_n^{I,0} + \tilde{\bf R}_{n-1} \end{eqnarray*}
where
\begin{eqnarray*} a_n &=& \frac{1}{\Delta t_n^2\beta} + (1+\alpha_H)\frac{\alpha_1\gamma}{\Delta t_n\beta} \\ b_n &=& (1+\alpha_H)\frac{\gamma}{\Delta t_n\beta} \\ c_n &=& (1+\alpha_H)\left(1+\frac{\alpha_2\gamma}{\Delta t_n\beta}\right) \end{eqnarray*}
and
\[ \tilde{\bf R}_n \;=\; {\bf F}_n^E - {\bf F}_n^S - (\alpha_1{\bf M}_n+\alpha_2{\bf K}_n)\dot{\bf u}_n \quad\mbox{(actual inertia force in time step $n > 0$)} \]
Solve for the incremental displacement:
\[ {\bf N}_n^0 \Delta{\bf u}_n^0 \;=\; {\bf R}_n^0 \quad\Longrightarrow\; \Delta{\bf u}_n^0 \]
Adjust the predicted velocity and acceleration:
\begin{eqnarray*} {\bf v}_n &=& {\bf v}_n - \dot{\bf u}_{n-1} \\ {\bf a}_n &=& {\bf a}_n - \ddot{\bf u}_{n-1} \end{eqnarray*}
Update configuration:
\begin{eqnarray*} i &=& i + 1 \\ \Delta{\bf u}_n &=& \Delta{\bf u}_n + \Delta{\bf u}_n^{i-1} \\ {\bf u}_n^i &=& {\bf u}_{n-1} \oplus \Delta{\bf u}_n \\ \dot{\bf u}_n^i &=& \frac{\gamma}{\Delta t_n\beta}\Delta{\bf u}_n - {\bf v}_n \\ \ddot{\bf u}_n^i &=& \frac{1}{\Delta t_n^2\beta}\Delta{\bf u}_n - {\bf a}_n \end{eqnarray*}
Assemble FE matrices and right-hand-side force vectors:
\[ \begin{array}{lll} {\bf K}_n^i \;=\; {\bf K}({\bf u}_n^i,t)\;, & {\bf C}_n^i \;=\; {\bf C}({\bf u}_n^i,t)\;, & {\bf M}_n^i \;=\; {\bf M}({\bf u}_n^i,t) \\[1mm] {\bf F}_n^{S,i} =\; {\bf F}^S({\bf u}_n^i,t)\;, & {\bf F}_n^{I,i} \;=\; {\bf F}^I({\bf u}_n^i,\ddot{\bf u}_n^i,t)\;, & {\bf F}_n^{E,i} \;=\; {\bf F}^E({\bf u}_n^i,t) \end{array} \]
Compute Newton matrix and associated incremental load vector:
\begin{eqnarray*} {\bf N}_n^i &=& a_n{\bf M}_n^i + b_n{\bf C}_n^i + c_n{\bf K}_n^i \\ {\bf R}_n^i &=& (1+\alpha_H)\left[{\bf F}_n^{E,i} - {\bf F}_n^{S,i} - (\alpha_1{\bf M}_n^i + \alpha_2{\bf K}_n^i + {\bf C}_n^i)\dot{\bf u}_n^i\right] - {\bf F}_n^{I,i} - \alpha_H\tilde{\bf R}_{n-1} \end{eqnarray*}
\[ {\bf N}_n^i \Delta{\bf u}_n^i \;=\; {\bf R}_n^i \quad\Longrightarrow\; \Delta{\bf u}_n^i \]
\begin{eqnarray*} \Delta{\bf u}_n &=& \Delta{\bf u}_n + \Delta{\bf u}_n^i \\ {\bf u}_n &=& {\bf u}_{n-1} \oplus \Delta{\bf u}_n \\ \dot{\bf u}_n&=&\frac{\gamma}{\Delta t_n\beta}\Delta{\bf u}_n-{\bf v}_n \\ \ddot{\bf u}_n&=&\frac{1}{\Delta t_n^2\beta}\Delta{\bf u}_n - {\bf a}_n \end{eqnarray*}
|
virtual |
Set solution vectors from a serialized state.
| [in] | data | Container for serialized data |
Reimplemented from MultiStepSIM.
References SIMsolution::deSerialize(), SystemVector::dim(), Fext, Finert, SIMbase::getName(), SIMbase::getNoEquations(), SystemVector::getPtr(), MultiStepSIM::model, and SIMsolution::restoreSolution().
|
protectedvirtual |
Finalizes the right-hand-side vector on the system level.
| [in] | predicting | If true, this is the first iteration of time step > 1 |
This method merges the nodal point loads into the right-hand-side vector of the linearized dynamic equilibrium equation, according to the HHT scheme. It also adds the actual inertia force Finert which has been computed from the dynamic equilibrium equation.
Reimplemented from NewmarkSIM.
References SIMbase::addToRHSvector(), utl::debugPrint(), Fext, Finert, NewmarkSIM::gamma, SIMbase::getRHSvector(), SystemVector::L1norm(), MultiStepSIM::model, and SystemVector::vec().
|
virtual |
Prints out problem-specific data to the log stream.
| [in] | stopInputTimer | If true, stop file input timer before print |
Reimplemented from NewmarkSIM.
References NewmarkSIM::alpha2, IFEM::cout, and NewmarkSIM::printProblem().
|
virtual |
Serialize solution vectors for restarting purposes.
| data | Container for serialized data |
Reimplemented from MultiStepSIM.
References SystemVector::dim(), Fext, Finert, SIMbase::getName(), SystemVector::getPtr(), MultiStepSIM::model, SIMsolution::saveSolution(), and SIMsolution::serialize().