#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "nssolver.h"
#include "slopesol.h"
#include "global.h"
#include "globmat.h"
#include "mechprint.h"
#include "gmatrix.h"
#include "gtopology.h"
#include "loadcase.h"
#include "dloadcase.h"
#include "intpoints.h"
#include "auxdatout.h"
#include "j2flow.h"
#include "chen.h"
#include "hardsoft.h"
#include "mathem.h"
#include "vector.h"
#include "mtsolver.h"
#include "adaptivity.h"
#include "meshtransfer.h"
Go to the source code of this file.
Functions | |
long | arclength (long lcid, long adaptcontrol) |
long | arclength15 (long lcid) |
long | arclengthadapt (long lcid, long adaptcontrol) |
void | arclopen (long &fi, long &n, double &blambda, double &dl, double *r, double *fp) |
function restarts saved step of arclength method | |
void | arclopen_adapt (long &fi, double &lambda, double &dlambda, double &dl) |
void | arclsave (long fi, long n, double blambda, double dl, double *r, double *fp) |
function saves actual step of arclength method | |
void | arclsave_adapt (long fi, double lambda, double dlambda, double dl) |
void | displ_control (long lcid) |
double | displincr (double *displincr, long n) |
void | newmeshgen (int w, long i) |
void | newton_raphson (long lcid) |
void | newton_raphson_restart (long lcid) |
function restarts Newton-Raphsom method from the file (used for analysis of Hinkley) | |
void | nonlinear_solver (long lcid) |
void | nonlinear_solver_adaptiv (long lcid) |
void | print_output (long lcid) |
void | quadeqcoeff (double *ddr, double *v, long n, double ddlambda, double psi, double norfp, double dl, double &a0, double &a1, double &a2) |
void | refresh_plast () |
void | seldofinit () |
The function initializes selected dofs used for the arclength method controling. | |
void | solve_nonlinear_statics () |
function calls appropriate solver for the nonlinear statics problem |
long arclength | ( | long | lcid, | |
long | adaptcontrol | |||
) |
function solves system of nonlinear algebraic equation by arc-length method (continuation method) only one right hand side vector is supported with respect to nonlinearity and absence of superposition
d stands for delta dd stands for capital delta
fc - nonproportional vector fp - proportional vector n - order of the system
lcid | - load case id |
25.7.2001
Definition at line 210 of file nssolver_old.cpp.
References Ada, addv(), arclopen(), arclopen_adapt(), arclsave(), arclsave_adapt(), compute_req_val(), copyv(), displincr(), nonlinman::dlal, nonlinman::dlmaxal, nonlinman::dlminal, nonlinman::erral, f, lhsrhs::give_lhs(), lhsrhs::give_rhs(), nonlinman::hdbackupal, internal_forces(), lhsrhs::lhs, long(), Lsrs, Mespr, Mm, Mp, Ndofm, nonlinman::nial, nonlinman::niilal, probdesc::nlman, Out, mechmat::plast, print_close(), print_flush(), print_init(), print_step(), gmatrix::printmat(), nonlinman::psial, quadeqcoeff(), adaptivity::run(), Smat, solv_polynom_2(), gmatrix::solve_system(), ss(), stiffness_matrix(), nonlinman::stmat, subv(), tangent_stiff, mechmat::updateipval(), and probdesc::zero.
Referenced by nonlinear_solver(), and nonlinear_solver_adaptiv().
long arclength15 | ( | long | lcid | ) |
Definition at line 594 of file nssolver_old.cpp.
References arclopen_adapt(), arclsave_adapt(), displincr(), nonlinman::dlal, nonlinman::dlmaxal, nonlinman::dlminal, nonlinman::erral, f, lhsrhs::give_lhs(), lhsrhs::give_rhs(), internal_forces(), Lsrs, Mespr, Mm, Mp, Ndofm, nonlinman::niilal, probdesc::nlman, mechmat::plast, nonlinman::psial, quadeqcoeff(), Smat, gmatrix::solve_system(), ss(), stiffness_matrix(), mechmat::updateipval(), and probdesc::zero.
Referenced by nonlinear_solver_adaptiv().
long arclengthadapt | ( | long | lcid, | |
long | adaptcontrol | |||
) |
function solves system of nonlinear algebraic equation by arc-length method (continuation method) only one right hand side vector is supported with respect to nonlinearity and absence of superposition
d stands for delta dd stands for capital delta
fc - nonproportional vector fp - proportional vector n - order of the system
lcid | - load case id |
23.12.2004
Definition at line 1817 of file nssolver_old.cpp.
References Ada, addv(), arclopen(), arclopen_adapt(), arclsave(), arclsave_adapt(), copyv(), displincr(), nonlinman::dlal, nonlinman::dlmaxal, nonlinman::dlminal, nonlinman::erral, f, lhsrhs::give_lhs(), lhsrhs::give_rhs(), nonlinman::hdbackupal, internal_forces(), long(), Lsrs, Mespr, Mm, Mp, Ndofm, nonlinman::nial, nonlinman::niilal, probdesc::nlman, mechmat::plast, print_close(), print_flush(), print_init(), print_step(), nonlinman::psial, quadeqcoeff(), adaptivity::run(), Smat, solv_polynom_2(), gmatrix::solve_system(), ss(), stiffness_matrix(), subv(), tangent_stiff, mechmat::updateipval(), and probdesc::zero.
Referenced by nonlinear_solver().
void arclopen | ( | long & | fi, | |
long & | n, | |||
double & | blambda, | |||
double & | dl, | |||
double * | r, | |||
double * | fp | |||
) |
function restarts saved step of arclength method
The function restores saved step of arclength method from the text file.
fi | - id of saved step | |
n | - number of r components | |
blambda | - attained load coefficient lambda | |
dl | - legth of arc (output) | |
r | - vector of attained displacements (output) | |
fp | - vector of proportional load (output) |
Created by JK,
Definition at line 1641 of file nssolver_old.cpp.
References intpoints::eqother, file, mechmat::ip, Mm, Mp, intpoints::ncompother, intpoints::ncompstr, probdesc::nlman, nonlinman::nsdofal, probdesc::path, nonlinman::seldofal, intpoints::strain, intpoints::stress, and mechmat::tnip.
void arclopen_adapt | ( | long & | fi, | |
double & | lambda, | |||
double & | dlambda, | |||
double & | dl | |||
) |
created 1.12.2002, Ladislav Svoboda, termit@cml.fsv.cvut.cz
Definition at line 1727 of file nssolver_old.cpp.
References file, Mp, and probdesc::path.
Referenced by arclength(), arclength15(), and arclengthadapt().
void arclsave | ( | long | fi, | |
long | n, | |||
double | blambda, | |||
double | dl, | |||
double * | r, | |||
double * | fp | |||
) |
function saves actual step of arclength method
The function saves actual step of arclength method to the text file.
fi | - id of saved step | |
n | - number of r components | |
blambda | - attained load coefficient lambda | |
dl | - legth of arc | |
r | - vector of attained displacements | |
fp | - vector of proportional load |
Created by JK,
Definition at line 1589 of file nssolver_old.cpp.
References intpoints::eqother, file, mechmat::ip, Mm, Mp, intpoints::ncompother, intpoints::ncompstr, probdesc::nlman, nonlinman::nsdofal, probdesc::path, nonlinman::seldofal, intpoints::strain, intpoints::stress, and mechmat::tnip.
void arclsave_adapt | ( | long | fi, | |
double | lambda, | |||
double | dlambda, | |||
double | dl | |||
) |
created 1.12.2002, Ladislav Svoboda, termit@cml.fsv.cvut.cz
Definition at line 1699 of file nssolver_old.cpp.
References file, Mp, and probdesc::path.
Referenced by arclength(), arclength15(), and arclengthadapt().
void displ_control | ( | long | lcid | ) |
Definition at line 977 of file nssolver_old.cpp.
References compute_req_val(), nonlinman::errnr, f, lhsrhs::give_lhs(), lhsrhs::give_rhs(), nonlinman::incrnr, internal_forces(), probdesc::lambda, Lsrs, memset(), Mespr, nonlinman::minincrnr, Mm, Mp, Ndofm, nonlinman::niilnr, nonlinman::ninr, probdesc::nlman, print_close(), print_flush(), print_init(), print_step(), Smat, gmatrix::solve_system(), ss(), stiffness_matrix(), tangent_stiff, mechmat::updateipval(), and probdesc::zero.
Referenced by nonlinear_solver().
double displincr | ( | double * | displincr, | |
long | n | |||
) |
Definition at line 1502 of file nssolver_old.cpp.
References alldofs, nonlinman::displnorm, Mp, probdesc::nlman, nodesdistincr, nonlinman::nsdofal, nonlinman::nxal, nonlinman::nyal, nonlinman::nzal, nonlinman::probdimal, nonlinman::seldofal, seldofs, seldofscoord, and ss().
void newmeshgen | ( | int | w, | |
long | i | |||
) |
created 1.12.2002, Ladislav Svoboda, termit@cml.fsv.cvut.cz
Definition at line 1756 of file nssolver_old.cpp.
References mechtop::give_degree(), Mespr, Mp, Mt, and probdesc::path.
Referenced by nonlinear_solver_adaptiv(), and solve_trfel_adaptivity_problem().
void newton_raphson | ( | long | lcid | ) |
Definition at line 818 of file nssolver_old.cpp.
References compute_req_val(), nonlinman::errnr, f, lhsrhs::give_lhs(), lhsrhs::give_rhs(), nonlinman::incrnr, internal_forces(), Lsrs, memset(), Mespr, nonlinman::minincrnr, Mm, Mp, Ndofm, nonlinman::niilnr, nonlinman::ninr, probdesc::nlman, print_close(), print_flush(), print_init(), print_step(), Smat, gmatrix::solve_system(), ss(), stiffness_matrix(), tangent_stiff, mechmat::updateipval(), and probdesc::zero.
Referenced by nonlinear_solver().
void newton_raphson_restart | ( | long | lcid | ) |
function restarts Newton-Raphsom method from the file (used for analysis of Hinkley)
Function solves system of nonlinear algebraic equations by Newton-Raphson method. Solved system does not contain time variable. The method retarts analysis from the saved data of the time dependent analysis. Internal data rearangement is performed with respect of solved problem in Hinkley nuclear power plant.
lcid | - required load case id |
Created by JK, Tomas Koudelka
Definition at line 1145 of file nssolver_old.cpp.
References nonlinman::backupfname, compute_req_val(), intpoints::eqother, nonlinman::errnr, f, lhsrhs::give_lhs(), lhsrhs::give_rhs(), Gtm, nonlinman::hdbid, nonlinman::hdbr, nonlinman::incrnr, internal_forces(), mechmat::ip, Lsrs, memset(), Mespr, nonlinman::minincrnr, Mm, Mp, intpoints::ncompeqother, intpoints::ncompstr, Ndofm, nonlinman::nienr, nonlinman::niilnr, nonlinman::ninr, probdesc::nlman, normv(), Out, print_close(), print_flush(), print_init(), print_step(), Smat, gmatrix::solve_system(), slesolv::solve_system(), solver_restore(), ss(), probdesc::ssle, stiffness_matrix(), nonlinman::stmat, probdesc::strcomp, intpoints::stress, tangent_stiff, mechmat::tnip, mechmat::updateipval(), and probdesc::zero.
void nonlinear_solver | ( | long | lcid | ) |
Definition at line 83 of file nssolver_old.cpp.
References adaptram, arcl, arclength(), arclengthadapt(), arclengthrv1(), arclrv1, displ_control(), displctrl, Mp, newton, newton_raphson(), newton_raphson_restart(), newton_raphsonrv1(), newtonrestart, newtonrv1, probdesc::nlman, and nonlinman::tnlinsol.
void nonlinear_solver_adaptiv | ( | long | lcid | ) |
if adaptcontrol = 1 - arclength nyni bezi poprve 2 - arclength nyni nebezi poprve
created 1.12.2002, Ladislav Svoboda, termit@cml.fsv.cvut.cz
Definition at line 138 of file nssolver_old.cpp.
References Ada, arcl, arclength(), arclength15(), file, probdesc::filename, long(), Mespr, Mm, Mp, newmeshgen(), newmeshread(), nonlinman::nial, probdesc::nlman, probdesc::path, mechmat::plast, refresh_plast(), adaptivity::run(), and nonlinman::tnlinsol.
Referenced by solve_nonlinear_statics().
void print_output | ( | long | lcid | ) |
Definition at line 55 of file nssolver_old.cpp.
void quadeqcoeff | ( | double * | ddr, | |
double * | v, | |||
long | n, | |||
double | ddlambda, | |||
double | psi, | |||
double | norfp, | |||
double | dl, | |||
double & | a0, | |||
double & | a1, | |||
double & | a2 | |||
) |
Definition at line 1554 of file nssolver_old.cpp.
References alldofs, nonlinman::displnorm, Mp, probdesc::nlman, nodesdistincr, nonlinman::nsdofal, nonlinman::seldofal, seldofs, seldofscoord, and ss().
void refresh_plast | ( | ) |
Definition at line 122 of file nssolver_old.cpp.
References j2flow::give_consparam(), intpoints::idm, mechmat::ip, mechmat::j2f, Mm, mechmat::plast, and mechmat::tnip.
Referenced by nonlinear_solver_adaptiv().
void seldofinit | ( | ) |
The function initializes selected dofs used for the arclength method controling.
The function solves system of nonlinear algebraic equations by the arc-length method. This method was modified to reach the given value lambdar of the lambda parameter. lambdar value is reached with required error errl. Only one right hand side vector is supported with respect to nonlinearity and absence of superposition. Proportional vector grows until the nial number of steps is reached.
lcid | - load case id | |
nlman | - pointer to structure conatining setup of the solver | |
ra | - vector of attained displacements | |
fa | - attained load vector | |
fc | - constant part of load vector (it is not influenced by lambda) | |
fp | - proportional part of load vector (it is increased by load coefficient lambda up to the nlman->lambdar) | |
li | - initial value of step id (default is 0) | |
ilambda | - initial value of load coefficient (default is 0) | |
outres | - flag for performing of output of results (if yes -> print_step procedure is called for the each step) |
Created by JK, 16.8.2001 Rewritten by TKo, JK 08.2011 Function performs calculation of one load/time step of the Newton-Raphson method for the given load case. Solved equation system does not contain time variable.
lcid | - load case id | |
nlman | - pointer to structure conatining setup of the solver | |
fa | - attained load vector | |
ra | - vector of attained displacements | |
fb | - residual vector or load vector increment - righthand side vector | |
dr | - vector of displacement increment - lefthand side vector | |
fb | - vector of internal forces | |
f | - auxiliary vector of actual load (call of solve_system rewrite it during solution) | |
istep | - time/load step id | |
j | - inner loop step id (output parameter, set to -1 if no inner loop was performed) | |
li | - initial value of time/load step id |
Created by Tomas Koudelka, 11.2012 The function initializes dof numbers for the particular types of displacement control. It is used in the arclength method.
Created by JK,
The function initializes dof numbers for the particular types of displacement control. It is used in the arclength method.
Created by JK,
Definition at line 1440 of file nssolver_old.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 solve_nonlinear_statics | ( | ) |
function calls appropriate solver for the nonlinear statics problem
function solves non-linear statics problems
JK
Definition at line 31 of file nssolver_old.cpp.
References arcl, arclg, arclrv, arclrv1, lhsrhs::give_lhs(), lhsrhs::give_rhs(), nonlinman::hdbackupal, probdesc::hdbcont, mechmat::initmaterialmodels(), probdesc::lambda, Lsrs, mefel_right_hand_side(), memset(), Mespr, Mm, Mp, Ndofm, lhsrhs::nlc, probdesc::nlman, nonlinear_solver(), nonlinear_solver_adaptiv(), print_close(), print_flush(), print_init(), print_step(), hdbcontr::restore_stat(), seldofinit(), solver_restore(), and nonlinman::tnlinsol.