1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
28 Transient/steady-state segregated finite-volume solver for small strain
29 elastic orthotropic solid bodies allowing for general principal material
33 Cardiff P, Karac A & Ivankovic A, A Large Strain Finite Volume Method for
34 Orthotropic Bodies with General Material Orientations, Computer Methods
35 in Applied Mechanics & Engineering, 2013,
36 http://dx.doi.org/10.1016/j.cma.2013.09.008
41 \*---------------------------------------------------------------------------*/
44 #include "constitutiveModel.H"
45 #include "solidInterface.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 int main(int argc, char *argv[])
51 # include "setRootCase.H"
52 # include "createTime.H"
53 # include "createMesh.H"
54 # include "createFields.H"
55 # include "createHistory.H"
56 # include "readDivSigmaExpMethod.H"
57 # include "createSolidInterfaceOrthotropic.H"
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 Info<< "\nStarting time loop\n" << endl;
65 Info<< "Time = " << runTime.timeName() << nl << endl;
67 # include "readSolidMechanicsControls.H"
70 lduMatrix::solverPerformance solverPerf;
71 scalar initialResidual = 1.0;
72 scalar relativeResidual = 1.0;
79 # include "calculateDivSigmaExp.H"
81 //- Linear momentum equation
86 fvm::laplacian(Kf, U, "laplacian(K,U)")
90 if (solidInterfaceCorr)
92 solidInterfacePtr->correct(UEqn);
95 solverPerf = UEqn.solve();
99 initialResidual = solverPerf.initialResidual();
104 gradU = fvc::grad(U); // use leastSquaresSolidInterface
106 //# include "setPlaneStressGradU.H"
108 # include "calculateRelativeResidual.H"
110 if (iCorr % infoFrequency == 0)
112 Info<< "\tTime " << runTime.value()
113 << ", Corr " << iCorr
114 << ", Solving for " << U.name()
115 << " using " << solverPerf.solverName()
116 << ", res = " << solverPerf.initialResidual()
117 << ", rel res = " << relativeResidual
118 << ", inner iters " << solverPerf.nIterations() << endl;
123 solverPerf.initialResidual() > convergenceTolerance
127 Info<< nl << "Time " << runTime.value() << ", Solving for " << U.name()
128 << ", Initial residual = " << initialResidual
129 << ", Final residual = " << solverPerf.initialResidual()
130 << ", No outer iterations " << iCorr
131 << nl << "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
132 << " ClockTime = " << runTime.elapsedClockTime() << " s"
135 # include "calculateEpsilonSigma.H"
136 # include "writeFields.H"
137 # include "writeHistory.H"
139 Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
140 << " ClockTime = " << runTime.elapsedClockTime() << " s\n\n"
144 Info<< "End\n" << endl;
150 // ************************************************************************* //