SIFEL/MEFEL/SRC/arclengthjk.cpp File Reference

Go to the source code of this file.

Functions

double arclengthrv (long lcid, nonlinman *nlman, double *ra, double *fa, double *fc, double *fp)
void assamble_attained_load_vector (double *fa, double *fc, double *fp, long n, double lambda, nonlinman *nlman)
long assemble_stiffness_matrix (long lcid, long i, long j, long li)
 The function assembles the stiffness matrix in dependence on the setup of the arclength method.
long check_divergence (nonlinman *nlman, matrix &lsm_a, vector &lsm_r, vector &lsm_l, long j, double norf)
double displincr (double *dr1, double *dr2, long n)
void quadeqcoeff (double *ddr, double *v, long n, double ddlambda, double psi, double norfp, double dl, double &a0, double &a1, double &a2)
void seldofinit ()
 The function initializes selected dofs used for the arclength method controling.
void update_attained_load_vector (double *fa, double *fp, long n, double lambda, double dlambda, nonlinman *nlman)

Function Documentation

double arclengthrv ( long  lcid,
nonlinman nlman,
double *  ra,
double *  fa,
double *  fc,
double *  fp 
)

The function solves system of nonlinear algebraic equations by the arc-length method. This method was modified to reach the given value rlambda of the lambda parameter. Rlambda value is reached with required error errl. Only one right hand side vector is supported with respect to nonlinearity and absence of superposition. Up to rlambda value the constant load vector is treated as proportional and then as constant. Proportional vector grows until the nial number of steps is reached.

Notation of internal variables:

  • d stands for delta
  • dd stands for capital delta
  • fc - nonproportional vector
  • fp - proportional vector
  • n - order of the system = the number of unknowns
Parameters:
lcid - load case id
nlman - pointer to structure conatining setup of the solver
ra - vector of attained displacements
fa - attained load vector
fc - vector of constant load
fp - vector of proportional load
Returns:
The function returns reached lambda parameter.

Created by JK, 16.8.2001 Rewritten by TKo, JK 08.2011

Definition at line 29 of file arclengthjk.cpp.

References adapt_psi_coeff(), addmultv(), addv(), assemble_attained_load_vector(), assemble_stiffness_matrix(), check_divergence(), compute_req_val(), copymultv(), copyv(), determine_dlambda(), displincr(), nonlinman::dlal, nonlinman::dlam, nonlinman::dlmaxal, nonlinman::dlminal, nonlinman::erral, nonlinman::errl, f, fillm(), fillv(), fullmethod, Gtm, probdesc::hdbcont, mechmat::initmaterialmodels(), internal_forces(), probdesc::jstep, nonlinman::max_tot_al, Mespr, Mm, mode, Mp, Ndofm, nonlinman::nial, nonlinman::niilal, probdesc::nlman, normv(), off, on, Out, print_close(), print_flush(), print_init(), print_step(), nonlinman::psial, hdbcontr::restore_stat(), hdbcontr::save_stat(), Smat, slesolv::solve_system(), solver_restore(), probdesc::ssle, subv(), update_attained_load_vector(), mechmat::updateipval(), and probdesc::zero.

Referenced by general_epressure(), and general_epressure_varsup().

void assamble_attained_load_vector ( double *  fa,
double *  fc,
double *  fp,
long  n,
double  lambda,
nonlinman nlman 
)

The function assembles the attained load vector fa. It depends on the two load vectors fc, fp, attained load coefficient lambda and the setup specified in the nlman.

Parameters:
fa - array of components of attained load vector
fc - array of the constant load vector which is added without lambda multiplier.
fp - array of proportional load vector which is added multiplied by lambda multiplier usually. In certain cases, the vector fp has to be applied until the required value lambdar_p is attained and than the increasing of load level stops.
n - number of components of fa, fc and fp
lambda - attained value of the load coefficient
nlman - structure with setup of handling of lambda and lambda tresholds
Returns:
The function returns updated attained load vectro in the parameter fa.

Created by TKo, 08.2011

Definition at line 633 of file arclengthjk.cpp.

References addmultv(), and on.

long assemble_stiffness_matrix ( long  lcid,
long  i,
long  j,
long  li 
)

The function assembles the stiffness matrix in dependence on the setup of the arclength method.

function assembles stiffness matrix if needed

The function assembles the stiffness matrix it depends on the variable Mp->nlman->stmat for possible values (see alias.h).

Parameters:
lcid - load case id
i - index in outer loop
j - index in inner loop
li - lower index of the outer loop = number of the first outer increment li=0 if the computation starts from the initial state li>0 if the computation starts from backup
Returns:
The function returns 1 if the stiffness_matrix function has been called and zero if the content of the stiffness matrix has not been changed. Additionally, it calls functions which changes the content of the global stiffness matrix.

JK, TKo, 30.8.2010

Definition at line 480 of file arclengthjk.cpp.

long check_divergence ( nonlinman nlman,
matrix lsm_a,
vector lsm_r,
vector lsm_l,
long  j,
double  norf 
)

The function performs the divergence check of the inner loop if it is required in the nlman setup. The divergence is detected with help of the least square method where the quadratic approximaton of the error/step_id curve is performed. If the minimum of the approximing quadratic function is exceeded the divergence of the iteration process is assumed and signalized by the nonzero return value. The minimum number of steps of the inner loop is performed depending on the nlman->div_min_steps setup but at least three steps has to be performed for the correct approximation.

Parameters:
nlman - pointer to the structure with the setup of the nonlinear solver
lsm_a - matrix used for the least square method. It will be used for the storage of contributions from the particular inner loop steps.
lsm_r - right hand side for the least square method. It will be used for the storage of contributions from the particular inner loop steps.
lsm_l - left hand side vector (unknown parameters of quadratic function)
j - inner loop step id
norf - error norm (norm of unbalanced forces)
Return values:
0 - no divergence detected
1 - divergence was detected

Created by TKo, 08.2011

Definition at line 707 of file arclengthjk.cpp.

References nonlinman::check_div, nonlinman::div_min_steps, lsm_quad(), Mp, on, and probdesc::zero.

Referenced by arclengthrv().

double displincr ( double *  dr1,
double *  dr2,
long  n 
)

The function computes square of generalized norm of vector of displacemnt increments. The function returns either square of vector norm computed from the selected componets or it returns increment of distance between selected nodes. It is used in the arclength method.

Parameters:
dr1 - array with components of the first vector of displacement increments
dr2 - array with components of the second vector of displacement increments
n - number of components of displincr array
Returns:
The function returns required norm.

Created by JK,

Definition at line 741 of file arclengthjk.cpp.

References alldofs, nonlinman::displnorm, Mp, probdesc::nlman, nodesdistincr, nonlinman::nsdofal, nonlinman::nxal, nonlinman::nyal, nonlinman::nzal, print_err(), nonlinman::probdimal, nonlinman::seldofal, seldofs, seldofscoord, selecnodes, and ss().

void quadeqcoeff ( double *  ddr,
double *  v,
long  n,
double  ddlambda,
double  psi,
double  norfp,
double  dl,
double &  a0,
double &  a1,
double &  a2 
)

Function computes coefficients of the quadratic equation used in the arclength method. The coefficients are computed with respect to type of load/displacement control.

Parameters:
ddr - increment of load coefficient lambda for the given step
v - vector of displacement increments
n - total number of DOFs (i.e. size of ddr and v arrays)
ddlambda - correction of increment of load coefficient lambda
psi - proportional weight coeffient (swithces between load/displacement control)
norfp - norm of proportional load vector
dl - length of arc
a0 - zero order coefficient (output)
a1 - first order coefficient (output)
a2 - second order coefficient (output)
Returns:
The function returns evaluated coefficient in the parameters a0, a1 and a2.

Created by JK,

The function determines increment of lambda (delta lambda).

Parameters:
ddr - Delta r + u
u - u = K^{-1}*(fa-fi)
v - v = K^{-1}*fp
ddrprev - Delta r (not updated by the vector u)
n - number of unknowns
ddlambda - Delta lambda
psi - proportional coefficient between load and displacement vectors
norfp - the norm of proportional vector
dl - length of the arc
dlambda - delta lambda (output of this function)
stop - indicator of end of iteration (output of this function)
nlman - pointer to structure with arclength setup (it is used for full arclength method)
gm - pointer to structure with the factorised stiffness matrix (it is used for full arclength method)
Returns:
The function returns delta lambda in the parameter dlambda and it sets the stop parameter to indicate the end of the arclength due to nonsolvable constrained conditions.

Created by JK, 30.8.2010

The function modifies the psi coefficient according to the ddlambda increment adaptively. If the increment decreases comparing to the initial/reference ddlambda increment (ddlamda0) than the value should be also decreased and thus the arclength is controlled rather by the displacements than by the load. The initial/reference value of the load increment ddlambda0 and proportional coefficient psi0 are updated at the beginning of the main iteration loop and if the ddlambda changes the sign comparing to the ddlambda 0 (peak point of loading curve).

Parameters:
i - step id
ddlambda - actual increment of the load coefficeint lambda
ddlambda0 - initial/reference value of the load coefficeint lambda increment (input/output parameter)
psi0 - initial/reference value of the proportional coefficeint (input/output parameter)
psi - actual value of the proportional coefficeint (input/output parameter)
Returns:
The function returns the actual value of psi in the correspondign parameter. Also the parameters ddlambda0 and psi0 can be changed.

Created by Tomas Koudelka 07.2011

Definition at line 810 of file arclengthjk.cpp.

References adapt_psi_coeff(), alldofs, determine_dlambda(), displincr(), nonlinman::displnorm, nonlinman::dlam, fullmethod, linearizedmeth, maxvalue, minangle, minvalue, Mp, probdesc::nlman, nodesdistincr, nodetermination, print_err(), quadeqcoeff(), seldofs, seldofscoord, selecnodes, sgn(), and solv_polynom_2().

void seldofinit (  ) 

The function initializes selected dofs used for the arclength method controling.

The function initializes dof numbers for the particular types of displacement control. It is used in the arclength method.

Returns:
The function does not return anything, it performs initialization of Mp->nlman.

Created by JK,

Definition at line 549 of file arclengthjk.cpp.

References alldofs, nonlinman::displnorm, mechtop::give_dof(), mechtop::give_ndofn(), gtopology::gnodes, Gtm, length(), Mp, Mt, probdesc::nlman, nodesdistincr, nonlinman::nsdofal, nonlinman::nsnal, nonlinman::nxal, nonlinman::nyal, nonlinman::nzal, nonlinman::seldofal, seldofs, seldofscoord, selecnodes, nonlinman::selnodal, gnode::x, gnode::y, and gnode::z.

void update_attained_load_vector ( double *  fa,
double *  fp,
long  n,
double  lambda,
double  dlambda,
nonlinman nlman 
)

The function updates the attained load vector fa. It depends on the two load vectors fc, fp, attained load coefficient lambda, load coefficient increment and the setup specified in the nlman.

Parameters:
fa - array of components of attained load vector
fp - array of proportional load vector which is added multiplied by lambda multiplier usually. In certain cases, the vector fp has to be applied until the required value lambdar_p is attained and than the increasing of load level stops.
n - number of components of fa, fc and fp
lambda - attained value of the load coefficient
dlambda - added lambda increment
nlman - structure with setup of handling of lambda and lambda tresholds
Returns:
The function returns updated attained load vectro in the parameter fa.

Created by TKo, 08.2011

Definition at line 662 of file arclengthjk.cpp.

References addmultv(), and on.

Referenced by arclengthrv().


Generated by  doxygen 1.6.2