Fixed URL for libccmio-2.6.1 (bug report #5 by Thomas Oliveira)
[foam-extend-3.2.git] / applications / solvers / solidMechanics / icoFsiElasticNonLinULSolidFoam / icoFsiElasticNonLinULSolidFoam.C
blobbdea491a8be1a0f32d4abb53583a51ba6d2203ac
1 /*---------------------------------------------------------------------------*\
2   =========                 |
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 -------------------------------------------------------------------------------
8 License
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/>.
24 Application
25     icoFsiElastciNonLinSolidFoam
27 Description
28     Transient solver for fluid-solid interaction for an incompressible
29     fluid and a large strain solid
30     solid mesh is moved using U interpolated using least squares method
32 Author
33     Zeljko Tukovic FSB Zagreb
34     adapted by Philip Cardiff
36 \*---------------------------------------------------------------------------*/
38 #include "fvCFD.H"
39 #include "dynamicFvMesh.H"
41 #include "constitutiveModel.H"
42 #include "solidTractionFvPatchVectorField.H"
43 #include "volPointInterpolation.H"
44 #include "pointPatchInterpolation.H"
46 #include "patchToPatchInterpolation.H"
47 #include "movingWallVelocityFvPatchVectorField.H"
49 #include "tetFemMatrices.H"
50 #include "tetPointFields.H"
51 #include "faceTetPolyPatch.H"
52 #include "tetPolyPatchInterpolation.H"
53 #include "fixedValueTetPolyPatchFields.H"
54 #include "fixedValuePointPatchFields.H"
56 #include "OFstream.H"
57 #include "EulerDdtScheme.H"
58 #include "backwardDdtScheme.H"
60 #include "pointFields.H"
61 #include "fixedGradientFvPatchFields.H"
62 #include "primitivePatchInterpolation.H"
63 #include "twoDPointCorrector.H"
64 #include "scalarIOField.H"
65 #include "leastSquaresVolPointInterpolation.H"
66 #include "symmetryPolyPatch.H"
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 int main(int argc, char *argv[])
72 #   include "setRootCase.H"
73 #   include "createTime.H"
74 #   include "createDynamicFvMesh.H"
75 #   include "createFields.H"
76 #   include "createStressMesh.H"
77 #   include "createStressFields.H"
78 #   include "readCouplingProperties.H"
79 #   include "createZoneToZoneInterpolators.H"
80 #   include "initContinuityErrs.H"
81 #   include "findGlobalFaceZones.H"
83 //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85     Info << "\nStarting time loop\n" << endl;
87     while (runTime.loop())
88     {
89         Info << "Time = " << runTime.timeName() << nl << endl;
91 #       include "readPISOControls.H"
93 #       include "readFsiControls.H"
95 #       include "createStressPointMesh.H"
97 #       include "createInterfaceFields.H"
99         label outerCorr=0;
101         do
102         {
103             outerCorr++;
105 #           include "setInterfaceDisplacement.H"
107 #           include "moveFluidMesh.H"
109 #           include "solveFluid.H"
111 #           include "setInterfaceForce.H"
113 #           include "solveSolid.H"
115 #           include "calcFsiResidual.H"
116         }
117         while
118         (
119             (fsiResidualNorm > outerCorrTolerance)
120          && (outerCorr < nOuterCorr)
121         );
123         Vs += DV;
125 #       include "rotateSolidFields.H"
126 #       include "moveSolidMeshLeastSquares.H"
127 #       include "calculateStress.H"
129 //#       include "calculateLiftAndDrag.H"
131         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
132             << "  ClockTime = " << runTime.elapsedClockTime() << " s"
133             << endl << endl;
134     }
136     Info<< "End\n" << endl;
138     return(0);
142 // ************************************************************************* //