compressibleInterDyMFoam.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #include "fvCFD.H"
00041 #include "dynamicFvMesh.H"
00042 #include "MULES.H"
00043 #include "subCycle.H"
00044 #include "interfaceProperties.H"
00045 #include "twoPhaseMixture.H"
00046 #include "turbulenceModel.H"
00047
00048
00049
00050 int main(int argc, char *argv[])
00051 {
00052 #include "setRootCase.H"
00053 #include "createTime.H"
00054 #include "createDynamicFvMesh.H"
00055 #include "readGravitationalAcceleration.H"
00056 #include "readControls.H"
00057 #include "initContinuityErrs.H"
00058 #include "createFields.H"
00059 #include "CourantNo.H"
00060 #include "setInitialDeltaT.H"
00061
00062
00063 Info<< "\nStarting time loop\n" << endl;
00064
00065 while (runTime.run())
00066 {
00067 #include "readControls.H"
00068 #include "CourantNo.H"
00069
00070
00071 fvc::makeAbsolute(phi, U);
00072
00073 #include "setDeltaT.H"
00074
00075 runTime++;
00076
00077 Info<< "Time = " << runTime.timeName() << nl << endl;
00078
00079 {
00080
00081 volScalarField divU = fvc::div(phi);
00082
00083 scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
00084
00085
00086 mesh.update();
00087
00088 if (mesh.changing())
00089 {
00090 Info<< "Execution time for mesh.update() = "
00091 << runTime.elapsedCpuTime() - timeBeforeMeshUpdate
00092 << " s" << endl;
00093 }
00094
00095 if (mesh.changing() && correctPhi)
00096 {
00097 #include "correctPhi.H"
00098 }
00099 }
00100
00101
00102 fvc::makeRelative(phi, U);
00103
00104 if (mesh.changing() && checkMeshCourantNo)
00105 {
00106 #include "meshCourantNo.H"
00107 }
00108
00109 turbulence->correct();
00110
00111
00112 for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
00113 {
00114 #include "alphaEqnsSubCycle.H"
00115
00116 solve(fvm::ddt(rho) + fvc::div(rhoPhi));
00117
00118 #include "UEqn.H"
00119
00120
00121 for (int corr=0; corr<nCorr; corr++)
00122 {
00123 #include "pEqn.H"
00124 }
00125 }
00126
00127 rho = alpha1*rho1 + alpha2*rho2;
00128
00129 runTime.write();
00130
00131 Info<< "ExecutionTime = "
00132 << runTime.elapsedCpuTime()
00133 << " s\n\n" << endl;
00134 }
00135
00136 Info<< "End\n" << endl;
00137
00138 return 0;
00139 }
00140
00141
00142
Copyright © 2000-2009 OpenCFD Ltd