Seperated inline include files, changed Make target, updated headers, corrected an error message
This commit is contained in:
parent
1a3f896178
commit
374f243152
11 changed files with 7 additions and 198 deletions
|
@ -1,3 +1,3 @@
|
||||||
multiSolverDemo.C
|
multiSolverDemo.C
|
||||||
|
|
||||||
EXE = $(FOAM_USER_APPBIN)/multiSolverDemo
|
EXE = $(FOAM_APPBIN)/multiSolverDemo
|
||||||
|
|
|
@ -1,114 +0,0 @@
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright held by original author
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Application
|
|
||||||
icoFoam
|
|
||||||
|
|
||||||
Description
|
|
||||||
Transient solver for incompressible, laminar flow of Newtonian fluids.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "fvCFD.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
|
||||||
|
|
||||||
# include "createTime.H"
|
|
||||||
# include "createMesh.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
# include "initContinuityErrs.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
|
||||||
|
|
||||||
for (runTime++; !runTime.end(); runTime++)
|
|
||||||
{
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
|
||||||
|
|
||||||
# include "readPISOControls.H"
|
|
||||||
# include "CourantNo.H"
|
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(U)
|
|
||||||
+ fvm::div(phi, U)
|
|
||||||
- fvm::laplacian(nu, U)
|
|
||||||
);
|
|
||||||
|
|
||||||
solve(UEqn == -fvc::grad(p));
|
|
||||||
|
|
||||||
// --- PISO loop
|
|
||||||
|
|
||||||
for (int corr=0; corr<nCorr; corr++)
|
|
||||||
{
|
|
||||||
volScalarField rUA = 1.0/UEqn.A();
|
|
||||||
|
|
||||||
U = rUA*UEqn.H();
|
|
||||||
phi = (fvc::interpolate(U) & mesh.Sf())
|
|
||||||
+ fvc::ddtPhiCorr(rUA, U, phi);
|
|
||||||
|
|
||||||
adjustPhi(phi, U, p);
|
|
||||||
|
|
||||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
|
||||||
{
|
|
||||||
fvScalarMatrix pEqn
|
|
||||||
(
|
|
||||||
fvm::laplacian(rUA, p) == fvc::div(phi)
|
|
||||||
);
|
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
|
||||||
pEqn.solve();
|
|
||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
|
||||||
{
|
|
||||||
phi -= pEqn.flux();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# include "continuityErrs.H"
|
|
||||||
|
|
||||||
U -= rUA*fvc::grad(p);
|
|
||||||
U.correctBoundaryConditions();
|
|
||||||
}
|
|
||||||
|
|
||||||
runTime.write();
|
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
|
||||||
<< nl << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
|
||||||
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
|
@ -26,8 +26,7 @@ Application
|
||||||
multiSolverDemo
|
multiSolverDemo
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Combination of icoFoam and scalarTransportFoam for testing of new multiTime
|
Demonstration multiSolver-enabled application.
|
||||||
framework.
|
|
||||||
|
|
||||||
Author
|
Author
|
||||||
David L. F. Gaden
|
David L. F. Gaden
|
||||||
|
|
|
@ -1,78 +0,0 @@
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright held by original author
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Application
|
|
||||||
scalarTransportFoam
|
|
||||||
|
|
||||||
Description
|
|
||||||
Solves a transport equation for a passive scalar
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "fvCFD.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
|
||||||
|
|
||||||
# include "createTime.H"
|
|
||||||
# include "createMesh.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nCalculating scalar transport\n" << endl;
|
|
||||||
|
|
||||||
# include "CourantNo.H"
|
|
||||||
|
|
||||||
for (runTime++; !runTime.end(); runTime++)
|
|
||||||
{
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
|
||||||
|
|
||||||
# include "readSIMPLEControls.H"
|
|
||||||
|
|
||||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
|
||||||
{
|
|
||||||
solve
|
|
||||||
(
|
|
||||||
fvm::ddt(T)
|
|
||||||
+ fvm::div(phi, T)
|
|
||||||
- fvm::laplacian(DT, T)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
runTime.write();
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
|
||||||
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
|
@ -1,3 +1,3 @@
|
||||||
multiSolver.C
|
multiSolver.C
|
||||||
|
|
||||||
EXE = $(FOAM_USER_APPBIN)/multiSolver
|
EXE = $(FOAM_APPBIN)/multiSolver
|
||||||
|
|
|
@ -420,7 +420,7 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
// Incorrect solver domain name
|
// Incorrect solver domain name
|
||||||
FatalErrorIn("multiSolver::main")
|
FatalErrorIn("multiSolver::main")
|
||||||
<< "solverDomainName " << solverDomains[i] << "is not "
|
<< "solverDomainName " << solverDomains[i] << " is not "
|
||||||
<< "found."
|
<< "found."
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,8 @@ Pstream/Allwmake
|
||||||
wmake libo OSspecific/$WM_OSTYPE
|
wmake libo OSspecific/$WM_OSTYPE
|
||||||
wmake libso OpenFOAM
|
wmake libso OpenFOAM
|
||||||
|
|
||||||
|
wmake libso multiSolver
|
||||||
|
|
||||||
# Decomposition methods needed by meshTools
|
# Decomposition methods needed by meshTools
|
||||||
decompositionMethods/AllwmakeLnInclude
|
decompositionMethods/AllwmakeLnInclude
|
||||||
decompositionMethods/Allwmake
|
decompositionMethods/Allwmake
|
||||||
|
|
|
@ -3,4 +3,4 @@ multiSolver/multiSolver.C
|
||||||
timeCluster/timeCluster.C
|
timeCluster/timeCluster.C
|
||||||
timeCluster/timeClusterList.C
|
timeCluster/timeClusterList.C
|
||||||
|
|
||||||
LIB = $(FOAM_USER_LIBBIN)/libmultiSolver
|
LIB = $(FOAM_LIBBIN)/libmultiSolver
|
||||||
|
|
Reference in a new issue