SDT-rotor Contents   Functions      PDF Index |
Purpose
Non linear links/force modeling for time simulation
Syntax
model=nl_spring('tab',model); ...= nl_spring('command', ...)
Description
nl_spring supports non-linear connections and loads for transient analysis. Non linear springs between 2 DOF (see nlspring). loads which depend on DOF values (see DofKuva, DofV), springs between 2 nodes in different bases (see RotCenter), etc. ...). A full list of non-linearities is given in nllist
Standard non-linear simulations are handled by nl_solve. Below is a description of the inner mechanisms of a non-linear simulation with the non-linear toolbox.
After the non linearity definition, a proper TimeOpt is required to set the good fe_time calls to perform a non linear Newmark time integration. A default TimeOpt can be set using nl_spring TimeOpt. It is possible to save transient results on the fly using a properFinalCleanup call, see nl_spring fe_timeCleanupCall , and to reload the same results using fe_simul fe_timeLoad.
The following steps are required for a time simulation
A non-linearity is always associated with elements or superelements (typically a celas element. A given group of elements can only be associated with a single non-linearity type.
The information needed to describe the non linearity is stored in a .NLdata field.
See nllist for supported non linearities, and nl_fun to add your own non-linearities.
One can define a set of non linear links between 2 parts of a model using a call of the form
[model,idof]=nl_spring('ConnectionBuild',model,data);
idof is a second optional out argument. It returns the list of DOF concerned by links (it can be useful in order to reduce super elements keeping idof as interfaces DOF for instance).
data contains all the information needed to define links. It is a 3 column stack like cell array. First column contains the string 'connection', the second the name of the non linear link described in the third column that contains a data structure with following fields:
Following example defines a model with a cylinder and a hole in a block. The cylinder is linked to the block by 3 celas preserving the pivot link.
mo1=demosdt('demoConnection-vol'); % meshes models mo1=fe_case(mo1,'fixdof','base','z==-1'); % clamps the cylinder base r1=struct('Origin',[0.5 0.5 0.5],'axis',[0 0 1],... 'radius',.1,'rtol',.01,'length',1,'Npt',-3,... 'ProId',111,'planes',[]); % Cylinder-side r1=nl_spring('ConnectionCyl',r1); % defines planes r3=r1; r3.ProId=1; % Block-side link={'connection','link1',struct('C1',r3,'C2',r1,... 'link',{{'celas',[0 0 12345 12345 1000 0 1e9]}})}; % Defines connection [model,idof]=nl_spring('ConnectionBuild',mo1,link); % builds connection cf=feplot(model); % displays in feplot fecom promodelviewon; fecom('curtab Cases','link1_2'); def=fe_eig(model,[5 20 1e3]); % computes the first 20 modes if length(find(def.data<1e-3))>1; sdtw('_err','connection failed'); end cf.def=def; fecom ColorDataAll % displays modes
See also t_nlspring('2beam') example.
Utility to fill the .planes field of a cylinder connection in the standard connection screw data structure format (see fe_caseg ConnectionScrew).
dataOut=nl_spring('ConnectionCyl',dataIn);
The dataIn uses fields:
q0=nl_spring('InitV',model,d0,RO);
InitV computes the initial static displacement and velocity associated to a DOF initial position and velocity. d0 is a data structure with field .DOF containing the DofId where initial value is applied and .def containing initial displacement and velocity at this DOF. RO is a optional input argument data structure with following fields that define:
If input argument RO omitted, options are get from 'info' 'initvopt' Stack entry. If there is no such entry, InitV parameters are computed using -optim process (see below).
Displacement at q0 and q0+dq is obtained meaning the last Np/10 steps of each stabilization period, and initial velocity is computed from those 2 displacements to match d0.def(2) at d0.DOF.
[q0,RO]=nl_spring('InitV-optim',model,d0); can be used to find input parameters RO. Optimization of dt and Np is performed from given or default values. Parameters dq and Nv are kept at given or default value. First dt is optimized. dt is increased (multiplied by 4) until time integration of the InitV process diverge and last dt that leads to convergence is kept. Then Np is increased by 100 steps until the deformation is converged on the stabilization periods, that is to say that a criteria taking in account standard deviation/mean of the deformation and the ratio of the last Np/10 steps upon previous Np/10 steps on each Np period is less than a tolerance (2.0).
See also t_nlspring('2beam') example.
model=nl_spring('NL',model)
This command is used to build .NL field data for time integration from NLdata field in NL p_spring property entries in the input model Stack. The command option -storefnl can be used to specify the way of computing and storing a non linear effort associated to NL (for those which support it).
opt.Jacobian=nl_spring('JacobianCall') returns the callback used to update or initialize the Jacobian ki used in iterative methods. This is the low level implementation of calls documented in nl_solve TgtMdl. The said Jacobian must take non-linearities into account and is thus of the form
(5.3) |
the output is controlled by the value of NL.Jacobian.
For the case of a non-linear spring, the most important gradient of the tabulated law Fu is added as stiffness between the 2 DOF to the stiffness matrix and the most important gradient of Fv to the damping matrix.
For non-linear iterations in a Newmark scheme, the Jacobian is given by
ki=(model.K{3}+kj)+ (opt(2)/opt(1))/dt*(model.K{2}+cj) + 1/opt(1)/dt^2*model.K{1};
Accepted command options, associated to variants of the call are
model=nl_spring('SetPro ProId i ParamName1 Value1 ...',model)
This command is used to change some nl_spring properties parameters. i is the ProId of corresponding p_spring property, ParamName the name of parameter to change (k for il(3), c for il(5) or the field name in NLdata) and Value the value to assign.
It is possible to define a new property by specifying an NLdata structure in third argument: model=nl_spring('SetPro ProId i',model,NLdata). If the property already exists, the NLdata is interpreted as a string of parameters and parsed to define the fields specified in the given NLdata to the existing one. Command option Edit allows directly merging the existing NLdata to the provided NLdata with priority given to the new fields.
model=nl_spring('Demo1DOF'); % define a non linearity with partial definition of parameters and other by default NLdata=nl_fun('db data 4') % standard NLdata defintion % NLdata has fields data, Jacobian (by default) and type % set in model model=nl_spring('setpro proid201',model,NLdata); % edit the nl_fun nl by string keyword model=nl_spring('setpro proid201 data2',model); % edit the nl_fun with struct input % property will be parsed using nl_fun('paramedit') model=nl_spring('setpro proid201',model,struct('Jacobian',2)); % field Jacobian has been edited, other fields are kept unchanged model.Stack{end,3}.NLdata model=nl_spring('setpro proid201',model,struct('NewField','test')); % you can see that in this case NewField was not set % as it is not referenced in the nl_fun parameters model.Stack{end,3}.NLdata % Force the with struct input with no check model=nl_spring('setproedit proid201',model,struct('data',10,'NewField','test')); % in this mode the NewField is propagated regardless of the % standard nl_fun input model.Stack{end,3}.NLdata
Standard NLdata structures depend on the non-linear function, see nllist for more details. They can be obtained through the nl_function command db, see nl_fun for more details.
In the case where
pro=nl_spring('GetPro',model)
This command is used to get non linear properties in the model stack.
The Follow mechanism can be used to observe some variable evolution during the time integration.
opt=fe_simul('Followi',opt);
1st Follow consists in monitoring the number of iteration, the residual norm and displacement increment norm at each time step.
model=nl_spring('Demo1DOF') opt=stack_get(model,'info','TimeOpt','GetData'); opt=fe_simul('Follow1',opt); % niter norm(r) norm(dq) def=fe_time(opt,model);
2nd Follow consists in monitoring the def.FNL in iiplot. For the moment the mechanism is different (so note that you can't both tracker niter and FNL), and you only have to specify the field .FnlIiplot equal to 1 in the 'info','OutputOptions' stack entry of the input model, as in following example :
model=nl_spring('Demo1DOF'); r1=stack_get(model,'info','OutputOptions','GetData'); r1.FnlIiplot=1; % define FNL tracker model=stack_set(model,'info','OutputOptions',r1); opt=stack_get(model,'info','TimeOpt','GetData'); def=fe_time(opt,model);
This command returns usual default TimeOpt for non-linear simulations. By default the output is the same as the TimeOptNLNewmark presented below. See also fe_time for TimeOpt definition details.
Supported TimeOpt commands are
The following command options allows setting other TimeOpt fields to their desired value.
Alternatively to providing all these command options in the command string, one can provide a MATLAB struct with equivalent fields as an additional argument.
By adding an SDT model as third argument, the generated TimeOpt will be directly integrated in the model, that will be output.
Sample calls :
% basic call opt = nl_solve('TimeOpt dt1e-6 ts3e5 maxNout1e4 -acall"lumpedMass"'); % call with struct input RO=struct('dt',1e-6,'ts',3e5,'maxNout',1e4,... 'acall','lumpedMass'); opt = nl_solve('TimeOptExplicit',RO); % basic call with model input model = nl_solve('TimeOpt dt1e-6 ts3e5 maxNout1e4 -acall"lumpedMass"',[],model); % call with struct and model input model = nl_solve('TimeOptExplicit',RO,model);
Convergence tests depend on the iteration algorithm and several behaviors can be obtained by modifying RelTol. In any case the absolute value of RelTol is used for the convergence test application; its sign is used to determine the convergence test to be used as described in the following.
From standard fe_time simulations, the following TimeOpt fields are added or modified
The TimeOptAssembleCall must use the -InitFcn callback of fe_caseg Assemble to perform initialization of the non linearities.
Command options are available to tweak the assemble call with minimal user input
The TimeOptResidual callback should be a call to mkl_utils, that performs optimized matrix vector products, and the computation of non linear forces handled by nl_functions. Command options allows choosing a call adapted to the type of simulations
The TimeOptFinalCleanupFcn callback must use the -ExitFcn of fe_simulto perform post treatments of non linearities. Custom options classical to the fe_simulFinalCleanup call can be added either in the command string or as a string in second argument.
opt.FinalCleanupFcn=nl_spring('fe_timeCleanupCall -cf-1-fullDOF'); % equivalent call with second argument opt.FinalCleanupFcn=nl_spring('fe_timeCleanupCall','-cf-1-fullDOF');
In addition to the standard fe_simulFinalCleanup, the following command options are available (to be specified outside the ExitFcn callback.
The OutputInit callback is locked for internal nl_spring use. Several command options are available that will be forwarded to the OutputInit procedure
Fine tuning of fe_time output can be achieved by specifying an 'info','OutputOptions' case entry.
Accepted fields for the OutputOptions structure are
Non linearities are treated by mkl_utils mex file. Details are provided in mkl_utils.
OBSOLETE. Use now nl_spring NL.
NL=nl_spring('rheo2NL',model,DOF,offset);
This command is used to convert rheological data into a structure of data understandable for NLforce command. DOF is the list of the DOF coherent with u and v arguments of NLforce command. Offset is optional. It is a structure of data with fields .DOF and .def that defined 0 reference for Fu and Fv tab laws.
model=nl_spring('tab',model);
This command is used to convert formal rheological description data stored in model.Stack to a tabulated law description. The format is likely to change due to optimization of the compiled functionality in mkl_utils (see mkl_utils).
Undocumented intermediate save of a time block for long simulations that do not fit in memory.