Chapter 9
Solution
Chapter Chapt er 9 – Solutio Solution n
Solvers •
The function of the solver solver is is to solve the system of linear simultaneous equations representing the structure’s degrees of freedom.
•
The solution could take anywhere from a few seconds to several hours depending primarily on the size of the model, the solver selected, and the speed of your computer.
•
A linear static analysis with one load step requires only one such solution, but a nonlinear or transient analysis may require tens, hundreds, or even thousands of solutions. Therefore, the type of solver you choose for solution can be quite important.
Chapter 9 – Solution
…Solvers •
The solvers available in ANSYS can be categorized into four types: 1) Direct elimination 2) Iterative 3) Distributed ANSYS † 1) Direct elimination solvers •
Sparse (default)
•
Frontal
2) Iterative solvers
†
•
PCG (Pre-conditioned Conjugate Gradient)
•
ICCG (Incomplete Cholesky Conjugate Gradient)
•
JCG (Jacobi Conjugate Gradient)
•
AMG (Algebraic Multigrid) † - (only Matrix Solution Distributed on Shared Memory)
Part of the Parallel Performance for ANSYS add-on license
Chapter 9 – Solution
…Solvers 3) Distributed ANSYS (D-ANSYS) (all of the ANSYS /SOLUTION phase is in parallel which includes stiffness matrix generation, linear equation solving and results calculation) •
Distributed Preconditioned Conjugate Gradient †
•
Distributed Jacobi Conjugate Gradient †
•
Distributed Sparse Solver † (EQSLVE, DSPARSE) – Factorization of the matrix and back/forward substitution is done in distributed parallel mode
•
Existing Shared Memory Sparse Solver
(EQSLVE, DPCG)
(EQSLVE, DJCG)
(EQSLVE,SPARSE)
–
The solver itself runs only on the master process (other parts run in distributed parallel)
–
May be run in shared memory parallel mode on the master machine (/CONFIG,NPROC,N)
A general discussion of direct and iterative solvers will be covered in the next slides.
†
Part of the Parallel Performance for ANSYS add-on license
Chapter 9 – Solution
…Solvers •
Calculate the solution as follows: 1. Formulate individual element matrices. 2. Assemble the global stiffness matrix.
Formulate element matrices
3a. (Sparse direct solver) Factorize the stiffness matrix, then calculate DOF solution from back-substitution. 3b. (Iterative Solver) Start with an assumed zero value for all DOF and iterate to convergence (based on an input tolerance on residual force).
Assemble global matrix
.full file
Solve matrix equation
.rst /.rth file
4. Use element matrices to calculate the element solution.
Chapter 9 – Solution
…Solvers Direct solver vs. Iterative solver (simplified discussion) •
If given the linear static case of [K]{x} = {F}, Direct solvers factorize [K] to solve for [K]-1. Then, {x} = [K] -1{F}. –
•
This factorization is computationally expensive but is done once.
Iterative solvers use a preconditioner [Q] to solve the equation [Q][K]{x} = [Q]{F}. Assume that [Q] = [K] -1. In this trivial case, [I]{x} = [K] -1{F}. However, the preconditioner is not usually [K]-1. The closer [Q] is to [K] -1, the better the preconditioning is. However, the preconditioner is not usually [K]-1, so this process is repeated - hence the name, iterative solver . –
For iterative solvers, matrix multiplication (not factorization) is performed. This is much faster than matrix inversion if done entirely in RAM, so, as long as the number of iterations is not very high (which happens for well-conditioned matrices), iterative solvers can be more efficient than sparse solvers.
–
The main difference between the iterative solvers in ANSYS — PCG, JCG, ICCG — is the type of pre-conditioner used.
Chapter 9 – Solution
…Solvers
Chapter 9 – Solution
…Solvers Parallel Performance solvers (special license required) •
AMG (Algebraic Multigrid) –
•
DDS (Distributed Domain Solver) –
•
Decomposes large models into smaller domains, and then sends those domains to multiple processors for solving. The DDS solver is scalable, intended for large static or full transient analyses, with symmetric matrices that do not involve inertia relief or problems using the probabilistic design system (PDS).
DPCG (Distributed Preconditioned Conjugate Gradient Solver) –
•
Iterative solver that can be used in single and multiprocessor environments
Based on the PCG solver. Preserves all of the merits of the PCG solver and can be run on either shared memory or distributed memory machines with superior scalability to the PCG solver.
DJCG (Distributed Jacobi Conjugate Gradient Solver) –
Iterative equation solver based on the JCG solver. Scalability of this solver is superior to the JCG solver with little extra memory required. DJCG solver is available only for static and full transient analyses where the stiffness is symmetric.
Chapter 9 – Solution
…Solvers •
To choose a solver: – Main Menu > Solution > Analysis Type > Sol’n Controls, then choose Sol’n Options tab – Or use EQSLV command
The default is to use a “program chosen” solver [eqslv,-1], which is usually the sparse direct solver.
Chapter 9 – Loading & Solution
Definitions •
What is a loadstep and a substep? Loadstep 1
Loadstep 2
Loadstep 3
Loadstep 4
Loadstep 5
Force 25
20
) s 15 b l ( e c r 10 o F
Substep 1 of Loadstep 2
A loadstep can be defined as one set of loading conditions for which you obtain a solution. A substep can be defined as a subdivision of a loadstep.
5
0 0
10
20
30
40
50
60
time (seconds)
70
80
90
100
Chapter 9 – Solution
Multiple Loadsteps •
The procedure to solve for one set of loading conditions (i.e, one load step) is as follows: – Import or create the model – Mesh it – Apply loads – Solve (one load step) – Review results
Chapter 9 – Solution
…Multiple Loadsteps •
If you have multiple loading conditions, you can choose one of two ways: – Solve for all loads together in a single load step – Or apply each loading condition separately and solve multiple load steps.
Chapter 9 – Solution
…Multiple Loadsteps •
By using multiple load steps, you can: – “isolate” the structure’s response to each loading condition. – combine these responses in any desired fashion during postprocessing, allowing you to study different “what-if” scenarios. (This is called load case combination and is valid for linear analyses only. Load case combinations are covered in a later chapter.)
•
There are two ways to define and solve multiple load steps: – Multiple solve method – Load step file method
Chapter 9 – Solution
…Multiple Loadsteps Multiple Solve Method •
• •
An extension of the single-load-step solution, where you solve each load step sequentially without leaving the Solution processor. Best suited for batch mode. When used in interactive mode, this method is useful only for models that solve quickly.
–
Import or create the model
–
Mesh it
–
Apply loads
–
Solve (load step 1)
–
Apply different loads
–
Solve (load step 2)
–
Apply different loads
–
Solve (load step 3)
–
Etc.
–
Review results
Chapter 9 – Solution
…Multiple Loadsteps Load Step File Method •
•
•
In this case, instead of solving each load step, you write the load step information to a file, called the load step file: –
Main Menu > Solution > Load Step Opts > Write LS File
–
Or use LSWRITE command.
The load step file is named jobname.s01, .s02, .s03, etc. After all load steps have been written out, you can use one command — LSSOLVE or Main Menu > Solution > Solve > From LS Files — to read in each file sequentially and solve it.
–
Import or create the model
–
Mesh it
–
Apply loads
– –
Write to LS file (.s01) Apply different loads
–
Write to LS file (.s02)
–
Apply different loads
–
Write to LS file (.s03)
– –
Etc. Solve from LS files
–
Review results
Chapter 9 – Solution
…Multiple Loadsteps •
The advantage of the load step file method is that you can interactively set up all load steps even for a large model and then solve them while you are away from the computer.
•
Note: The loading commands on the load step file are always in terms of nodes and elements, even if you apply loads on the solid model.
Chapter 9 – Solution
…Multiple Loadsteps •
For both methods: – It is recommended that the user specify a new title prior to SOLVE (Multiple Solve Method) and LSWRITE (Load Step File Method) since /TITLE is saved in the results file for each load step. – Loads applied in a previous load step will stay in the database unless they are deleted. So be sure to delete any loads that are not part of the current load step. – Results for each load step are appended to the results file and identified as load step 1, load step 2, etc. – In postprocessing, you first “read in” the desired set of results and then review them. – The database contains the loads and results for the last load step that was solved.
Chapter 9 – Solution
Workshops •
This workshop consists of three exercises: W9A. 3-D Bracket W9B. Connecting Rod W9C. Wheel
Refer to your Workshop Supplement for instructions.