nl_solve
Purpose
Integrated non linear simulations
Description
The simulation of non linearities require special handling in SDT, which is packaged in the non linear toolbox. This function aims at performing classical studies, such as done by fe_simulfor classical SDT models with this special handling.
See nllist for the list of supported non linearities.
TimeOpt
nl_solve('TimeOptMethod',RO) used to initialize fe_time options for later simulation. Currently implemented methods
-
Explicit Newmark scheme
- Stat non-linear static Newton
- Theta method time integration.
- ModalNewmark uses an optimized fully C based integration for the case where DOF correspond to modal degree of freedom. The stepped sine strategy is discussed in section ??.
- NLNewmark default implicit Newmark scheme.
Associated options provided in RO or in the command are
-
.tend end time of simulation. Used to initialize .ts=ceil(tend/dt).
Static
To compute the static state of a model with non-linearities.
q0=nl_solve('static',model);
It is possible to use custom fe_time simulation properties using the model stack entry info,TimeOptStat. See nl_spring TimeOpt for fields and defaults.
It is possible to use as command option any field from the usual static simulation option, see sdtweb nl_spring#TimeOpt to have more details. E.g. To redefine on the fly the maximum number of iteration, one can enter [q0,opt]=nl_solve('static maxiter 100',model);.
By default, the staticNewton algorithm implemented in fe_time is called.
An Uzawa algorithm is also implemented in nl_solve, under the method static nl_solve uzawa. This algorithm is very different from the staticNewton one since here the solution is not incremented but fully re-computed at each iteration. This is useful when some non-linear forces do not derive from potentials.
Command StaticUzawa can be used in nl_solve – to access it: q0=nl_solve('static Uzawa',model);.
Mode
The definition of modes for non-linear models is not straight forward. This command aims at computing tangent modes as function of a non-linear model current state. The resolution thus concerns a linear model with tangent stiffness, damping matrices corresponding to the model current displacement, velocity, acceleration state. The eigenvalue solvers used are then fe_eigfor real modes and fe_ceigfor complex modes.
By default, modes tangent to a static state are computed. A static simulation is performed to produce a model state from which tangent matrices are computed. It is also possible to compute tangent modes at specific instants during a transient simulation, at SaveTimes instant, and to store frequency/damping data and deformations.
A set of command options allows detailing the mode computation wanted and the output.
Accepted command options to control the model computation itself are
- -allmatdes to ask for an assembly with all matrix types assembled, the default assembly command used is -matdes 2 3 1. This command can be used to keep specific matrix types defined in pre-assembled superelements.
- cpx for complex mode computation (default is real mode computation).
- -evalFNL (in combination with command traj) asks to recompute the FNL field on the fly based on displacements prior to mode computation. This command is useful when solutions used for the tangent state have been imported from an external solver.
- skip skips fe_timesimulations and performs the complex mode computation based on the zero deformation and with initialized values of non linearities. The behavior will thus depend on the non linearity initialization strategy. E.g. for contact see (p_contact), the -skip option will consider a full contact state.
- stat for mode computation based on a static state (typically after a fe_time staticNewton simulation). Uses model stack entry info,TimeOptStat.
- time for mode computations during a transient simulation (exclusive with the default -stat option). Uses model stack entry info,TimeOpt.
- traj for mode computations based on states provided as an additional argument.
The -stat and -time options are mutually exclusive and define the base solver options to be used by fe_timefor the preliminary state computation. With -stat option (default) the stack entry info, TimeOptStat will be sought and used if found. With -time option, the stack entry info,TimeOpt will be used if found.
The -traj option is complementary and is used to force the complex mode computation on provided states. On can either provide the state in deformation curve format, see sdtweb def as a last argument, or use predefined stack entries. In -stat mode (default), the model stack entry curve,q0 will be sought and used if found, if not the result will use the -skip mode. In -time mode, the model stack entry curve,TSIM will be sought and used. If not found an error will occur.
Accepted command options to control the output format are
- -addedOnly (in combination with backTgtMdl) only outputs the tangent matrices as a superelement that would have been added to the base matrices for the mode computation.
- -alpha (requires -cpx) to also output the real mode participation to the complex modes. This is in fact the projection of the complex modes on the real mode basis.
- -backTgtMdl outputs the tangent model that would have been used for mode computation.
- -dataOnly to save only the frequency, damping data (does not store the deformation field). The output is then under a frequency tracking curve in the iiplotformat.
- -fullDOF to output the deformation fields restituted on the unconstrained DOF.
- -keepTval (requires -cpx) to allow keeping the underlying real mode basis when computing complex modes. With val set to 1, the initial real mode basis will be kept under field def.T, as an additional independent output, coherent with the -alpha command option. With val set to 2, the complex modes will not be restituted but expressed on the subspace used for their computation, the subspace basis will be output in def.Mode.TR, allowing a complete compatibility with feploton-the-fly restitution strategy for display. This latter option is the most complete and efficient strategy. Complete subspace information is kept and can be used for further exploitation, complex mode projection on real mode (-alpha) is naturally obtained, and memory footprint is optimized as the storage size of the subspace is commonly lower by a factor 1.5 to 2 than the complex mode basis;
- -noPost is used to skip any solution post treatment, and outputs the raw mode structure straight from the solver.
- -PostFcn”cam” is used to perform specific post-treatments on the mode output after computation.
- -real "ModeBas" (requires -cpx) to specify a particular real mode basis on which the complex modes will be computed. The real mode basis is supposed to be stored in the model stack entry curve, ModeBas.
Internally, the solver defines and uses the model stack entry info,SolveOpt structure to handle the options documented above. One can define it as a structure with the fields documented (case sensitive) and provide it instead of the EigOpt input. Additional advanced field are then accessible
-
EigOpt a vector providing eigenvalue computation options following the fe_eigformat.
- cpx”command” to externalize the mode computation. This command is by default a Boolean telling the solver whether to perform a complex mode computation (set to 1) or a real mode computation (set to 0). If a string is provided, the solver will evaluate it as an external command instead of performing mode computation. One then gets access to the nl_solve mode computation framework for ones' own solver.
- ind provides a vector of indices that will be used to restrict the output to the indexed modes.
- SubDef provides a command that will be evaluated to perform a dynamic user defined restriction to the output modes, it is thus more general than the ind option. The result of the command has to be a vector of indices.
- AssembleCall to force a specific AssembleCall strategy.
The various input and output strategies allow for the support of several input syntax. The following calls are thus accepted, with model a standard SDT model, Case a standard SDT case structure, eigopt either a vector providing options for fe_eigor a structure with optional fields defined above, def a standard SDT deformation field structure used by -traj when necessary.
nl_solve('mode',model);
nl_solve('mode',model,eigopt);
nl_solve('mode',model,Case,eigopt);
nl_solve('mode',model,def);
nl_solve('mode',model,Case,def);
nl_solve('mode',model,eigopt,def);
nl_solve('mode',model,Case,eigopt,def);
Sample calls using command options to extract tangent modes are given below.
def0=nl_solve('Mode',model)
def0=nl_solve('Mode',model,[5 20 1e3])
def0=nl_solve('Mode-stat-fullDOF',model);
defT=nl_solve('Mode-time',model);
hist=nl_solve('Mode-time-dataOnly',model);
histC=nl_solve('Mode-cpx-time-dataOnly',model);
defC=nl_solve('Mode-cpx-time-alpha-real''MyBas''-fullDOF',model);
def1=nl_solve('Mode-skip-fullDOF',model);
Post
The Post command allows performing energy and potential further post treatments of a non-linear simulation. The output is integrated in the standard fe_timesimulation outputs in field out.Post that is a three columns cell array directly compatible with the iiplot format.
To obtain the post treatments, one must define them prior to starting the simulation. Direct computation of the post-treatments a posteriori is also possible.
-
Command PostDefine adapts the TimeOpt structure to initialize fields in the output and trigger post treatments in the final cleanup phase. The PostDefine call must thus be performed after the TimeOpt call. Using this command itself prior to a time simulation is enough to obtain the post treatments.
opt=nl_solve('PostDefine keys',opt);
model=nl_solve('PostDefine keys',model);
- Command PostLab provides the list of available post treatment keywords. The input is a structure with fields the post treatment keywords and a logical.
- Command PostHist provides an iiplot curve structure adapted to the post treatments. On can provide a PostLab structure with fields assigned to 1 for desired posts to obtain the corresponding curve.
- Command PostCompute computes the post treatments and store them in out.Post. This command is internally called if the PostDefine command was used prior to the time simulation. For a posteriori computations, the user must provide the out as a standard fe_time format initialized with Post field and the assembled model. The model must feature a stack entry info, OutputOptions with field Post containing the PostLab structure.
opt=nl_solve('TimeOpt');
Perform the time simulation
def=fe_time(opt,model);
[def,RO]=nl_solve('PostInit EnerM',def);
model=stack_set(model,'info','OutputOptions',...
struct('Post',RO));
model=fe_case(opt.AssembleCall,model);
def=nl_solve('PostCompute',def,model);
iiplot(def.Post);
- Command PostInit is an internal function that initializes the output Post field at the start of the simulation. Early initialization is useful if the post treatments are performed on the fly by the OutputFcn.
The following post treatments are available
-
EnerP The linear potential, or strain energy.
- EnerK The kinetic energy.
- EnerNL The elastic or strain energy stored in the non linearities.
- EnerM The mechanical energy, defined as EnerP + EnerK + EnerNL.
- PDiss The instant dissipated power.
- EnerDiss The cumulated dissipated energy over time.
Command PostEstimate allows analyzing the energy curves to compute
-
Fest an estimation of the vibration frequency (based on quasi-sinusoidal oscillations)
- DmpR an estimation of the damping ratio based on the estimated frequency by computing the dissipated mechanical energy. ζ = 1/4π logEm(t0)/Em(t1)
- Emax the maximum mechanical energy identified on the cycle analyzed.
- EDiss the dissipated mechanical energy over the cycle analyzed.
The following command options allow altering the estimation
-
-cfi to specify the iiplot figure with handle i.
- -bandpassfmax to perform a bandpass from 0 to fmax Hz filtering prior to the analysis.
- -curveName”name” to provide the iiplot stacked curve name to exploit.
- -baseOn”name” to specify on which post treated curve the frequency estimation is made.
- -globalMaxTolval to provide a relative tolerance over which a point is detected as close to the global maximum. This is exploited to detect the peaks over the energy signal analyzed.
- -localMax to estimate the frequency by detecting the zeros of the signal derivative (less robust).
- -unit”II” to provide an output unit system.
- XFcn”str” to provide a function call to be evaluated that can perform further post treatments( e.g. model specific posts). The called function can access out, outLab, st, j1 with out a matrix containing the output with as many lines as provided curves and as many columns as outputs data, outLab a cell array containing the labels of each column, st the curve list (either names or the curves themselves), j1 the curve currently treated.
r1 = nl_solve('PostEstimate',def);
r1 = nl_solve('PostEstimate',def.Post{1,3});
r1 = nl_solve('PostEstimate',{'disp(1)'});
r1 = nl_solve('PostEstimate',{'Post_NLsolve(1)'});
TgtMdlBuild,Assemble
Integrated command to generate linearized models around a specific working point. This command packages the tangent model generation procedures of nl_solve Mode-backTgtMdl. The low level implementations are documented in nl_spring NLJacobianUpdate (for example keepLin interaction are documented there).
-
TgtMdlAssemble command outputs a fully linearized assembled model, based on the static state provided.
- TgtMdlBuild command generates a linearized model with superelement coupling containing the tangent stiffness and damping contributions of all non-linearities. The following command options are supported
-
-keepName allows naming the superelements with the non-linearity name.
- -evalFNL forces recomputation of non-linearities states before generation.
- -staticInterp generates a tangent model allowing tangent matrix interpolation between different static states. The procedure requires the definition of parameters and a method to compute static states. Static states for MinMax configurations of each parameters is then performed. Matrices showing differences as function of parameters are kept and an interpolation rule is defined using the linear finite element functions of a 2npar vertices hypercube. The output model has stack fields curve,q0 the series of static states with q0.data providing the parameter points, and info,sCoef providing interpolation rules for each matrix.
RA=struct('par',Ra,'q0cbk',{{@my_fun,'ComputeStatic'}});
mo1=nl_solve('TgtMdlBuild-staticInterp',model,RA);
Ra is either a Range structure or the content of Range.param (see sdtweb fe_range), q0cbk is a callback in cell-array format.
model=d_contact('cubes cbuild');
q0=nl_solve('static',model);
mo1=nl_solve('TgtMdlBuild',stack_set(model,'curve','q0',q0));
feutil('info',mo1)
SE=stack_get(mo1,'SE'); SE{1,3}
©1991-2023 by SDTools