Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (194)
Showing
with 173 additions and 54 deletions
...@@ -37,7 +37,10 @@ src/Allwmake $targetType $* ...@@ -37,7 +37,10 @@ src/Allwmake $targetType $*
applications/Allwmake $targetType $* applications/Allwmake $targetType $*
# Optionally build OpenFOAM Doxygen documentation # Optionally build OpenFOAM Doxygen documentation
[ $genDoc -eq 1 ] && doc/Allwmake if [ $genDoc -eq 1 ]
then
doc/Allwmake
fi
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
\defgroup grpDNSSolvers Direct Numerical Simulation solvers
@{
\ingroup grpSolvers
This group contains Direct Numerical Simulation (DNS) solvers.
@}
\*---------------------------------------------------------------------------*/
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
dnsFoam dnsFoam
Group
grpDNSSolvers
Description Description
Direct numerical simulation solver for boxes of isotropic turbulence Direct numerical simulation solver for boxes of isotropic turbulence
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
\defgroup grpBasicSolvers Basic solvers
@{
\ingroup grpSolvers
This group contains basic solvers.
@}
\*---------------------------------------------------------------------------*/
...@@ -24,8 +24,30 @@ License ...@@ -24,8 +24,30 @@ License
Application Application
laplacianFoam laplacianFoam
Group
grpBasicSolvers
Description Description
Solves a simple Laplace equation, e.g. for thermal diffusion in a solid. Laplace equation solver for a scalar quantity.
\heading Solver details
The solver is applicable to, e.g. for thermal diffusion in a solid. The
equation is given by:
\f[
\ddt{T} = \div \left( D_T \grad T \right)
\f]
Where:
\vartable
T | Scalar field which is solved for, e.g. temperature
D_T | Diffusion coefficient
\endvartable
\heading Required fields
\plaintable
T | Scalar field which is solved for, e.g. temperature
\endplaintable
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
......
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude -I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \
-lfvOptions \
-lsampling -lsampling
...@@ -87,7 +87,6 @@ Description ...@@ -87,7 +87,6 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "pisoControl.H" #include "pisoControl.H"
#include "fvIOoptionList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...@@ -132,7 +131,6 @@ int main(int argc, char *argv[]) ...@@ -132,7 +131,6 @@ int main(int argc, char *argv[])
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createMRF.H"
#include "createFvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude -I$(LIB_SRC)/sampling/lnInclude
......
...@@ -24,13 +24,37 @@ License ...@@ -24,13 +24,37 @@ License
Application Application
scalarTransportFoam scalarTransportFoam
Group
grpBasicSolvers
Description Description
Solves a transport equation for a passive scalar Passive scalar transport equation solver.
\heading Solver details
The equation is given by:
\f[
\ddt{T} + \div \left(\vec{U} T\right) - \div \left(D_T \grad T \right)
= S_{T}
\f]
Where:
\vartable
T | Passive scalar
D_T | Diffusion coefficient
S_T | Source
\endvartable
\heading Required fields
\plaintable
T | Passive scalar
U | Velocity [m/s]
\endplaintable
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "fvIOoptionList.H" #include "fvOptions.H"
#include "simpleControl.H" #include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
{ {
volScalarField& hea = thermo.he(); volScalarField& hea = thermo.he();
solve fvScalarMatrix EaEqn
( (
betav*fvm::ddt(rho, hea) + mvConvection->fvmDiv(phi, hea) betav*fvm::ddt(rho, hea) + mvConvection->fvmDiv(phi, hea)
+ betav*fvc::ddt(rho, K) + fvc::div(phi, K) + betav*fvc::ddt(rho, K) + fvc::div(phi, K)
...@@ -16,7 +16,16 @@ ...@@ -16,7 +16,16 @@
: -betav*dpdt : -betav*dpdt
) )
- fvm::laplacian(Db, hea) - fvm::laplacian(Db, hea)
+ betav*fvOptions(rho, hea)
); );
EaEqn.relax();
fvOptions.constrain(EaEqn);
EaEqn.solve();
fvOptions.correct(hea);
thermo.correct(); thermo.correct();
} }
...@@ -2,7 +2,7 @@ if (ign.ignited()) ...@@ -2,7 +2,7 @@ if (ign.ignited())
{ {
volScalarField& heau = thermo.heu(); volScalarField& heau = thermo.heu();
solve fvScalarMatrix heauEqn
( (
betav*fvm::ddt(rho, heau) + mvConvection->fvmDiv(phi, heau) betav*fvm::ddt(rho, heau) + mvConvection->fvmDiv(phi, heau)
+ (betav*fvc::ddt(rho, K) + fvc::div(phi, K))*rho/thermo.rhou() + (betav*fvc::ddt(rho, K) + fvc::div(phi, K))*rho/thermo.rhou()
...@@ -23,5 +23,13 @@ if (ign.ignited()) ...@@ -23,5 +23,13 @@ if (ign.ignited())
// A possible solution would be to solve for ftu as well as ft. // A possible solution would be to solve for ftu as well as ft.
//- fvm::div(muEff*fvc::grad(b)/(b + 0.001), heau) //- fvm::div(muEff*fvc::grad(b)/(b + 0.001), heau)
//+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), heau) //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), heau)
==
betav*fvOptions(rho, heau)
); );
fvOptions.constrain(heauEqn);
heauEqn.solve();
fvOptions.correct(heau);
} }
...@@ -16,7 +16,7 @@ EXE_INC = \ ...@@ -16,7 +16,7 @@ EXE_INC = \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude -I$(LIB_SRC)/triSurface/lnInclude \
EXE_LIBS = \ EXE_LIBS = \
-lengine \ -lengine \
...@@ -29,4 +29,5 @@ EXE_LIBS = \ ...@@ -29,4 +29,5 @@ EXE_LIBS = \
-lspecie \ -lspecie \
-llaminarFlameSpeedModels \ -llaminarFlameSpeedModels \
-lfiniteVolume \ -lfiniteVolume \
-ldynamicFvMesh -ldynamicFvMesh \
-lfvOptions
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
PDRFoam PDRFoam
Group
grpCombustionSolvers
Description Description
Solver for compressible premixed/partially-premixed combustion with Solver for compressible premixed/partially-premixed combustion with
turbulence modelling. turbulence modelling.
...@@ -54,16 +57,17 @@ Description ...@@ -54,16 +57,17 @@ Description
regions containing blockages which cannot be resolved by the mesh. regions containing blockages which cannot be resolved by the mesh.
The fields used by this solver are: The fields used by this solver are:
\plaintable
betav: Volume porosity betav | Volume porosity
Lobs: Average diameter of obstacle in cell (m) Lobs | Average diameter of obstacle in cell (m)
Aw: Obstacle surface area per unit volume (1/m) Aw | Obstacle surface area per unit volume (1/m)
CR: Drag tensor (1/m) CR | Drag tensor (1/m)
CT: Turbulence generation parameter (1/m) CT | Turbulence generation parameter (1/m)
Nv: Number of obstacles in cell per unit volume (m^-2) Nv | Number of obstacles in cell per unit volume (m^-2)
nsv: Tensor whose diagonal indicates the number to substract from nsv | Tensor whose diagonal indicates the number to substract from
Nv to get the number of obstacles crossing the flow in each | Nv to get the number of obstacles crossing the flow in each
direction. | direction.
\endplaintable
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
...@@ -77,6 +81,7 @@ Description ...@@ -77,6 +81,7 @@ Description
#include "Switch.H" #include "Switch.H"
#include "bound.H" #include "bound.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...@@ -93,11 +98,13 @@ int main(int argc, char *argv[]) ...@@ -93,11 +98,13 @@ int main(int argc, char *argv[])
#include "readGravitationalAcceleration.H" #include "readGravitationalAcceleration.H"
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createMRF.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "createTimeControls.H" #include "createTimeControls.H"
#include "compressibleCourantNo.H" #include "compressibleCourantNo.H"
#include "setInitialDeltaT.H" #include "setInitialDeltaT.H"
turbulence->validate();
scalar StCoNum = 0.0; scalar StCoNum = 0.0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
...@@ -87,6 +87,7 @@ int main(int argc, char *argv[]) ...@@ -87,6 +87,7 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H" #include "compressibleCourantNo.H"
#include "setInitialDeltaT.H" #include "setInitialDeltaT.H"
turbulence->validate();
scalar StCoNum = 0.0; scalar StCoNum = 0.0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
...@@ -168,7 +168,7 @@ public: ...@@ -168,7 +168,7 @@ public:
virtual void writeFields() const virtual void writeFields() const
{ {
notImplemented("PDRDragModel::write()"); NotImplemented;
} }
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -45,10 +45,8 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New ...@@ -45,10 +45,8 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown PDRDragModel type "
"PDRDragModel::New"
) << "Unknown PDRDragModel type "
<< modelType << nl << nl << modelType << nl << nl
<< "Valid PDRDragModels are : " << endl << "Valid PDRDragModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
......
...@@ -7,13 +7,17 @@ ...@@ -7,13 +7,17 @@
+ turbulence->divDevRhoReff(U) + turbulence->divDevRhoReff(U)
== ==
betav*rho*g betav*rho*g
+ betav*fvOptions(rho, U)
); );
fvOptions.constrain(UEqn);
volSymmTensorField invA(inv(I*UEqn.A() + drag->Dcu())); volSymmTensorField invA(inv(I*UEqn.A() + drag->Dcu()));
if (pimple.momentumPredictor()) if (pimple.momentumPredictor())
{ {
U = invA & (UEqn.H() - betav*fvc::grad(p)); U = invA & (UEqn.H() - betav*fvc::grad(p));
U.correctBoundaryConditions(); U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -44,15 +44,8 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New ...@@ -44,15 +44,8 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown XiEqModel type "
"XiEqModel::New"
"("
" const psiuReactionThermo& thermo,"
" const compressible::RASModel& turbulence,"
" const volScalarField& Su"
")"
) << "Unknown XiEqModel type "
<< modelType << nl << nl << modelType << nl << nl
<< "Valid XiEqModels are : " << endl << "Valid XiEqModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -44,15 +44,8 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New ...@@ -44,15 +44,8 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown XiGModel type "
"XiGModel::New"
"("
" const psiuReactionThermo& thermo,"
" const compressible::RASModel& turbulence,"
" const volScalarField& Su"
")"
) << "Unknown XiGModel type "
<< modelType << nl << nl << modelType << nl << nl
<< "Valid XiGModels are : " << endl << "Valid XiGModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -47,10 +47,8 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New ...@@ -47,10 +47,8 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown XiModel type "
"XiModel::New"
) << "Unknown XiModel type "
<< modelType << nl << nl << modelType << nl << nl
<< "Valid XiModels are : " << endl << "Valid XiModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
......