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 $*
applications/Allwmake $targetType $*
# Optionally build OpenFOAM Doxygen documentation
[ $genDoc -eq 1 ] && doc/Allwmake
if [ $genDoc -eq 1 ]
then
doc/Allwmake
fi
# ----------------------------------------------------------------- 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
Application
dnsFoam
Group
grpDNSSolvers
Description
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
Application
laplacianFoam
Group
grpBasicSolvers
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 = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lfvOptions \
-lsampling
......@@ -87,7 +87,6 @@ Description
#include "fvCFD.H"
#include "pisoControl.H"
#include "fvIOoptionList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -132,7 +131,6 @@ int main(int argc, char *argv[])
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
......
......@@ -24,13 +24,37 @@ License
Application
scalarTransportFoam
Group
grpBasicSolvers
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 "fvIOoptionList.H"
#include "fvOptions.H"
#include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
{
volScalarField& hea = thermo.he();
solve
fvScalarMatrix EaEqn
(
betav*fvm::ddt(rho, hea) + mvConvection->fvmDiv(phi, hea)
+ betav*fvc::ddt(rho, K) + fvc::div(phi, K)
......@@ -16,7 +16,16 @@
: -betav*dpdt
)
- fvm::laplacian(Db, hea)
+ betav*fvOptions(rho, hea)
);
EaEqn.relax();
fvOptions.constrain(EaEqn);
EaEqn.solve();
fvOptions.correct(hea);
thermo.correct();
}
......@@ -2,7 +2,7 @@ if (ign.ignited())
{
volScalarField& heau = thermo.heu();
solve
fvScalarMatrix heauEqn
(
betav*fvm::ddt(rho, heau) + mvConvection->fvmDiv(phi, heau)
+ (betav*fvc::ddt(rho, K) + fvc::div(phi, K))*rho/thermo.rhou()
......@@ -23,5 +23,13 @@ if (ign.ignited())
// A possible solution would be to solve for ftu as well as ft.
//- fvm::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 = \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude
-I$(LIB_SRC)/triSurface/lnInclude \
EXE_LIBS = \
-lengine \
......@@ -29,4 +29,5 @@ EXE_LIBS = \
-lspecie \
-llaminarFlameSpeedModels \
-lfiniteVolume \
-ldynamicFvMesh
-ldynamicFvMesh \
-lfvOptions
......@@ -24,6 +24,9 @@ License
Application
PDRFoam
Group
grpCombustionSolvers
Description
Solver for compressible premixed/partially-premixed combustion with
turbulence modelling.
......@@ -54,16 +57,17 @@ Description
regions containing blockages which cannot be resolved by the mesh.
The fields used by this solver are:
betav: Volume porosity
Lobs: Average diameter of obstacle in cell (m)
Aw: Obstacle surface area per unit volume (1/m)
CR: Drag tensor (1/m)
CT: Turbulence generation parameter (1/m)
Nv: Number of obstacles in cell per unit volume (m^-2)
nsv: Tensor whose diagonal indicates the number to substract from
Nv to get the number of obstacles crossing the flow in each
direction.
\plaintable
betav | Volume porosity
Lobs | Average diameter of obstacle in cell (m)
Aw | Obstacle surface area per unit volume (1/m)
CR | Drag tensor (1/m)
CT | Turbulence generation parameter (1/m)
Nv | Number of obstacles in cell per unit volume (m^-2)
nsv | Tensor whose diagonal indicates the number to substract from
| Nv to get the number of obstacles crossing the flow in each
| direction.
\endplaintable
\*---------------------------------------------------------------------------*/
......@@ -77,6 +81,7 @@ Description
#include "Switch.H"
#include "bound.H"
#include "pimpleControl.H"
#include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -93,11 +98,13 @@ int main(int argc, char *argv[])
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "createTimeControls.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
turbulence->validate();
scalar StCoNum = 0.0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -87,6 +87,7 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
turbulence->validate();
scalar StCoNum = 0.0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -168,7 +168,7 @@ public:
virtual void writeFields() const
{
notImplemented("PDRDragModel::write()");
NotImplemented;
}
};
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -45,10 +45,8 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"PDRDragModel::New"
) << "Unknown PDRDragModel type "
FatalErrorInFunction
<< "Unknown PDRDragModel type "
<< modelType << nl << nl
<< "Valid PDRDragModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
......
......@@ -7,13 +7,17 @@
+ turbulence->divDevRhoReff(U)
==
betav*rho*g
+ betav*fvOptions(rho, U)
);
fvOptions.constrain(UEqn);
volSymmTensorField invA(inv(I*UEqn.A() + drag->Dcu()));
if (pimple.momentumPredictor())
{
U = invA & (UEqn.H() - betav*fvc::grad(p));
U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U);
}
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -44,15 +44,8 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"XiEqModel::New"
"("
" const psiuReactionThermo& thermo,"
" const compressible::RASModel& turbulence,"
" const volScalarField& Su"
")"
) << "Unknown XiEqModel type "
FatalErrorInFunction
<< "Unknown XiEqModel type "
<< modelType << nl << nl
<< "Valid XiEqModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -44,15 +44,8 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"XiGModel::New"
"("
" const psiuReactionThermo& thermo,"
" const compressible::RASModel& turbulence,"
" const volScalarField& Su"
")"
) << "Unknown XiGModel type "
FatalErrorInFunction
<< "Unknown XiGModel type "
<< modelType << nl << nl
<< "Valid XiGModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -47,10 +47,8 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"XiModel::New"
) << "Unknown XiModel type "
FatalErrorInFunction
<< "Unknown XiModel type "
<< modelType << nl << nl
<< "Valid XiModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
......