mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -5,6 +5,8 @@ tmp<fvVectorMatrix> UEqn
|
||||
fvm::ddt(rho, U)
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
==
|
||||
sources(rho, U)
|
||||
);
|
||||
|
||||
UEqn().relax();
|
||||
@ -13,6 +15,6 @@ sources.constrain(UEqn());
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn() == -fvc::grad(p) + sources(rho, U));
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ rho.relax();
|
||||
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*(UEqn() == sources(rho, U))().H();
|
||||
HbyA = rAU*UEqn().H();
|
||||
|
||||
if (pimple.nCorrPISO() <= 1)
|
||||
{
|
||||
@ -24,6 +24,8 @@ if (pimple.transonic())
|
||||
)
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(psi), phid);
|
||||
|
||||
volScalarField Dp("Dp", rho*rAU);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
@ -59,6 +61,8 @@ else
|
||||
)
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
volScalarField Dp("Dp", rho*rAU);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
rhoLTSPimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/rhoLTSPimpleFoam
|
||||
@ -26,7 +26,7 @@ Application
|
||||
|
||||
Description
|
||||
Transient solver for laminar or turbulent flow of compressible fluids
|
||||
with support for porous media and MRF for HVAC and similar applications.
|
||||
with support for run-time selectable sources, e.g. MRF, explicit porosity.
|
||||
|
||||
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
|
||||
pseudo-transient simulations with support for local time-stepping for
|
||||
@ -37,8 +37,6 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "psiThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "IOMRFZoneList.H"
|
||||
#include "IOporosityModelList.H"
|
||||
#include "IObasicSourceList.H"
|
||||
#include "fvcSmooth.H"
|
||||
#include "pimpleControl.H"
|
||||
@ -56,7 +54,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "setInitialrDeltaT.H"
|
||||
#include "createFields.H"
|
||||
#include "createZones.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -1,3 +0,0 @@
|
||||
rhoPorousMRFLTSPimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/rhoPorousMRFLTSPimpleFoam
|
||||
@ -1,4 +0,0 @@
|
||||
rhoPorousMRFPimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/rhoPorousMRFPimpleFoam
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/fieldSources/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lfieldSources
|
||||
@ -1,22 +0,0 @@
|
||||
// Solve the Momentum equation
|
||||
|
||||
tmp<fvVectorMatrix> UEqn
|
||||
(
|
||||
//pZones.ddt(rho, U)
|
||||
fvm::ddt(rho, U)
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
);
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
mrfZones.addCoriolis(rho, UEqn());
|
||||
|
||||
pZones.addResistance(UEqn());
|
||||
|
||||
sources.constrain(UEqn());
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn() == -fvc::grad(p) + sources(rho, U));
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
IOMRFZoneList mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
||||
|
||||
IOporosityModelList pZones(mesh);
|
||||
Switch pressureImplicitPorosity(false);
|
||||
@ -1,111 +0,0 @@
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*(UEqn() == sources(rho, U))().H();
|
||||
|
||||
if (pimple.nCorrPISO() <= 1)
|
||||
{
|
||||
UEqn.clear();
|
||||
}
|
||||
|
||||
if (pimple.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
)
|
||||
);
|
||||
mrfZones.relativeFlux(fvc::interpolate(psi), phid);
|
||||
|
||||
volScalarField Dp("Dp", rho*rAU);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::ddt(psi, p)
|
||||
+ fvm::div(phid, p)
|
||||
- fvm::laplacian(Dp, p)
|
||||
==
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn, rho.name());
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::interpolate(rho)
|
||||
*(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
mrfZones.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
volScalarField Dp("Dp", rho*rAU);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
// Pressure corrector
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::ddt(psi, p)
|
||||
+ fvc::div(phiHbyA)
|
||||
- fvm::laplacian(Dp, p)
|
||||
==
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn, rho.name());
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phiHbyA + pEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
Info<< "rho max/min : " << max(rho).value()
|
||||
<< " " << min(rho).value() << endl;
|
||||
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
sources.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
@ -1,109 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 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/>.
|
||||
|
||||
Application
|
||||
rhoPorousMRFPimpleFoam
|
||||
|
||||
Description
|
||||
Transient solver for laminar or turbulent flow of compressible fluids
|
||||
with support for porous media and MRF for HVAC and similar applications.
|
||||
|
||||
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
|
||||
pseudo-transient simulations.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "psiThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "bound.H"
|
||||
#include "IOMRFZoneList.H"
|
||||
#include "IOporosityModelList.H"
|
||||
#include "IObasicSourceList.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createZones.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
if (pimple.nCorrPIMPLE() <= 1)
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "EEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence->correct();
|
||||
}
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -4,6 +4,8 @@
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
==
|
||||
sources(rho, U)
|
||||
);
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*(UEqn() == sources(rho, U))().H();
|
||||
HbyA = rAU*UEqn().H();
|
||||
|
||||
UEqn.clear();
|
||||
|
||||
@ -20,6 +20,8 @@
|
||||
fvc::interpolate(psi)*(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(psi), phid);
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
@ -53,6 +55,8 @@
|
||||
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
closedVolume = adjustPhi(phiHbyA, U, p);
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
rhoPorousMRFSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/rhoPorousMRFSimpleFoam
|
||||
@ -0,0 +1,3 @@
|
||||
rhoPorousSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/rhoPorousSimpleFoam
|
||||
@ -5,12 +5,10 @@ tmp<fvVectorMatrix> UEqn
|
||||
fvm::ddt(U)
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevReff(U)
|
||||
==
|
||||
sources(U)
|
||||
);
|
||||
|
||||
mrfZones.addCoriolis(UEqn());
|
||||
|
||||
pZones.addResistance(UEqn());
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
sources.constrain(UEqn());
|
||||
@ -19,5 +17,5 @@ volScalarField rAU(1.0/UEqn().A());
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn() == -fvc::grad(p) + sources(U));
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
}
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
IOMRFZoneList mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
||||
|
||||
IOporosityModelList pZones(mesh);
|
||||
@ -1,5 +1,5 @@
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*(UEqn() == sources(U))().H();
|
||||
HbyA = rAU*UEqn().H();
|
||||
|
||||
if (pimple.nCorrPISO() <= 1)
|
||||
{
|
||||
@ -15,7 +15,7 @@ surfaceScalarField phiHbyA
|
||||
|
||||
adjustPhi(phiHbyA, U, p);
|
||||
|
||||
mrfZones.relativeFlux(phiHbyA);
|
||||
sources.relativeFlux(phiHbyA);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
while (pimple.correctNonOrthogonal())
|
||||
|
||||
@ -30,8 +30,7 @@ Description
|
||||
|
||||
Sub-models include:
|
||||
- turbulence modelling, i.e. laminar, RAS or LES
|
||||
- porosity (explicit treatment)
|
||||
- Multiple Reference Frame (MRF)
|
||||
- run-time selectable sources, e.g. MRF, explicit porosity
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -51,7 +50,6 @@ int main(int argc, char *argv[])
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
#include "createZones.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
@ -1,85 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 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/>.
|
||||
|
||||
Application
|
||||
MRFSimpleFoam
|
||||
|
||||
Description
|
||||
Steady-state solver for incompressible, turbulent flow of non-Newtonian
|
||||
fluids with MRF regions.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "IOMRFZoneList.H"
|
||||
#include "simpleControl.H"
|
||||
#include "IObasicSourceList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
IOMRFZoneList mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// --- Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,3 +0,0 @@
|
||||
MRFSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/MRFSimpleFoam
|
||||
@ -1,19 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/fieldSources/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lfieldSources \
|
||||
-lsampling
|
||||
@ -1,17 +0,0 @@
|
||||
// Momentum predictor
|
||||
|
||||
tmp<fvVectorMatrix> UEqn
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ turbulence->divDevReff(U)
|
||||
==
|
||||
sources(U)
|
||||
);
|
||||
|
||||
mrfZones.addCoriolis(UEqn());
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
sources.constrain(UEqn());
|
||||
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
@ -1,38 +0,0 @@
|
||||
{
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*UEqn().H();
|
||||
UEqn.clear();
|
||||
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
|
||||
adjustPhi(phiHbyA, U, p);
|
||||
mrfZones.relativeFlux(phiHbyA);
|
||||
adjustPhi(phiHbyA, U, p);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(rAU, p) == fvc::div(phiHbyA)
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
pEqn.solve();
|
||||
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phiHbyA - pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
// Momentum corrector
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
sources.correct(U);
|
||||
}
|
||||
@ -7,6 +7,8 @@
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
|
||||
adjustPhi(phiHbyA, U, p);
|
||||
|
||||
sources.relativeFlux(phiHbyA);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
|
||||
@ -8,6 +8,8 @@
|
||||
sources(U)
|
||||
);
|
||||
|
||||
mrfZones.addCoriolis(UEqn());
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
sources.constrain(UEqn());
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
IOMRFZoneList mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
||||
|
||||
IOporosityModelList pZones(mesh);
|
||||
Switch pressureImplicitPorosity(false);
|
||||
|
||||
@ -12,6 +12,8 @@ UEqn.clear();
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
|
||||
adjustPhi(phiHbyA, U, p);
|
||||
|
||||
mrfZones.relativeFlux(phiHbyA);
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
tmp<fvScalarMatrix> tpEqn;
|
||||
@ -50,3 +52,4 @@ else
|
||||
}
|
||||
|
||||
U.correctBoundaryConditions();
|
||||
sources.correct(U);
|
||||
|
||||
@ -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-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -26,15 +26,17 @@ Application
|
||||
|
||||
Description
|
||||
Steady-state solver for incompressible, turbulent flow with
|
||||
implicit or explicit porosity treatment
|
||||
implicit or explicit porosity treatment and support for multiple reference
|
||||
frames (MRF)
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "IOporosityModelList.H"
|
||||
#include "simpleControl.H"
|
||||
#include "IOMRFZoneList.H"
|
||||
#include "IOporosityModelList.H"
|
||||
#include "IObasicSourceList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -48,7 +50,7 @@ int main(int argc, char *argv[])
|
||||
simpleControl simple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createPorousZones.H"
|
||||
#include "createZones.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -3,13 +3,17 @@ basicSource/basicSourceIO.C
|
||||
basicSource/basicSourceList.C
|
||||
basicSource/IObasicSourceList.C
|
||||
|
||||
general/semiImplicitSource/semiImplicitSource.C
|
||||
general/explicitSetValue/explicitSetValue.C
|
||||
general/codedSource/codedSource.C
|
||||
general/explicitSetValue/explicitSetValue.C
|
||||
general/semiImplicitSource/semiImplicitSource.C
|
||||
|
||||
derived/actuationDiskSource/actuationDiskSource.C
|
||||
derived/explicitPorositySource/explicitPorositySource.C
|
||||
derived/fixedTemperatureSource/fixedTemperatureSource.C
|
||||
derived/MRFSource/MRFSource.C
|
||||
derived/pressureGradientExplicitSource/pressureGradientExplicitSource.C
|
||||
derived/pressureGradientExplicitSource/pressureGradientExplicitSourceIO.C
|
||||
|
||||
derived/radialActuationDiskSource/radialActuationDiskSource.C
|
||||
derived/rotorDiskSource/rotorDiskSource.C
|
||||
derived/rotorDiskSource/bladeModel/bladeModel.C
|
||||
derived/rotorDiskSource/profileModel/profileModel.C
|
||||
@ -21,15 +25,11 @@ derived/rotorDiskSource/trimModel/trimModel/trimModelNew.C
|
||||
derived/rotorDiskSource/trimModel/fixed/fixedTrim.C
|
||||
derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C
|
||||
|
||||
derived/actuationDiskSource/actuationDiskSource.C
|
||||
derived/radialActuationDiskSource/radialActuationDiskSource.C
|
||||
|
||||
interRegion = derived/interRegionHeatTransferModel
|
||||
$(interRegion)/interRegionHeatTransferModel/interRegionHeatTransferModel.C
|
||||
$(interRegion)/constantHeatTransfer/constantHeatTransfer.C
|
||||
$(interRegion)/interRegionHeatTransferModel/interRegionHeatTransferModel.C
|
||||
$(interRegion)/tabulatedHeatTransfer/tabulatedHeatTransfer.C
|
||||
$(interRegion)/variableHeatTransfer/variableHeatTransfer.C
|
||||
|
||||
derived/fixedTemperatureSource/fixedTemperatureSource.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libfieldSources
|
||||
|
||||
@ -481,4 +481,36 @@ void Foam::basicSource::setValue(fvMatrix<tensor>& eqn, const label fieldI)
|
||||
}
|
||||
|
||||
|
||||
void Foam::basicSource::relativeFlux(surfaceScalarField& phi) const
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::basicSource::relativeFlux
|
||||
(
|
||||
const surfaceScalarField& rho,
|
||||
surfaceScalarField& phi
|
||||
) const
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::basicSource::absoluteFlux(surfaceScalarField& phi) const
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::basicSource::absoluteFlux
|
||||
(
|
||||
const surfaceScalarField& rho,
|
||||
surfaceScalarField& phi
|
||||
) const
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -427,6 +427,29 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Flux manipulations
|
||||
|
||||
//- Make the given absolute flux relative
|
||||
virtual void relativeFlux(surfaceScalarField& phi) const;
|
||||
|
||||
//- Make the given absolute mass-flux relative
|
||||
virtual void relativeFlux
|
||||
(
|
||||
const surfaceScalarField& rho,
|
||||
surfaceScalarField& phi
|
||||
) const;
|
||||
|
||||
//- Make the given relative flux absolute
|
||||
virtual void absoluteFlux(surfaceScalarField& phi) const;
|
||||
|
||||
//- Make the given relative mass-flux absolute
|
||||
virtual void absoluteFlux
|
||||
(
|
||||
const surfaceScalarField& rho,
|
||||
surfaceScalarField& phi
|
||||
) const;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write the source header information
|
||||
|
||||
@ -108,6 +108,50 @@ void Foam::basicSourceList::reset(const dictionary& dict)
|
||||
}
|
||||
|
||||
|
||||
void Foam::basicSourceList::relativeFlux(surfaceScalarField& phi) const
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i).relativeFlux(phi);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::basicSourceList::relativeFlux
|
||||
(
|
||||
const surfaceScalarField& rho,
|
||||
surfaceScalarField& phi
|
||||
) const
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i).relativeFlux(rho, phi);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::basicSourceList::absoluteFlux(surfaceScalarField& phi) const
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i).absoluteFlux(phi);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::basicSourceList::absoluteFlux
|
||||
(
|
||||
const surfaceScalarField& rho,
|
||||
surfaceScalarField& phi
|
||||
) const
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i).absoluteFlux(rho, phi);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Foam::basicSourceList::read(const dictionary& dict)
|
||||
{
|
||||
checkTimeIndex_ = mesh_.time().timeIndex() + 2;
|
||||
|
||||
@ -152,6 +152,29 @@ public:
|
||||
void constrain(fvMatrix<Type>& eqn, const word& fieldName);
|
||||
|
||||
|
||||
// Flux manipulations
|
||||
|
||||
//- Make the given absolute flux relative
|
||||
void relativeFlux(surfaceScalarField& phi) const;
|
||||
|
||||
//- Make the given absolute mass-flux relative
|
||||
void relativeFlux
|
||||
(
|
||||
const surfaceScalarField& rho,
|
||||
surfaceScalarField& phi
|
||||
) const;
|
||||
|
||||
//- Make the given relative flux absolute
|
||||
void absoluteFlux(surfaceScalarField& phi) const;
|
||||
|
||||
//- Make the given relative mass-flux absolute
|
||||
void absoluteFlux
|
||||
(
|
||||
const surfaceScalarField& rho,
|
||||
surfaceScalarField& phi
|
||||
) const;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Read dictionary
|
||||
|
||||
176
src/fieldSources/derived/MRFSource/MRFSource.C
Normal file
176
src/fieldSources/derived/MRFSource/MRFSource.C
Normal file
@ -0,0 +1,176 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "MRFSource.H"
|
||||
#include "fvMesh.H"
|
||||
#include "fvMatrices.H"
|
||||
#include "MRFZone.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(MRFSource, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
basicSource,
|
||||
MRFSource,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
void Foam::MRFSource::initialise()
|
||||
{
|
||||
if (selectionMode_ != smCellZone)
|
||||
{
|
||||
FatalErrorIn("void Foam::MRFSource::initialise()")
|
||||
<< "The porosity region must be specified as a cellZone. Current "
|
||||
<< "selection mode is " << selectionModeTypeNames_[selectionMode_]
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
mrfPtr_.reset
|
||||
(
|
||||
new MRFZone
|
||||
(
|
||||
name_,
|
||||
mesh_,
|
||||
coeffs_,
|
||||
cellSetName_
|
||||
)
|
||||
);
|
||||
|
||||
const volVectorField& U = mesh_.lookupObject<volVectorField>(UName_);
|
||||
|
||||
mrfPtr_->correctBoundaryVelocity(const_cast<volVectorField&>(U));
|
||||
|
||||
fieldNames_.setSize(1, UName_);
|
||||
applied_.setSize(1, false);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::MRFSource::MRFSource
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
basicSource(name, modelType, dict, mesh),
|
||||
mrfPtr_(NULL),
|
||||
UName_(coeffs_.lookupOrDefault<word>("UName", "U")),
|
||||
rhoName_(coeffs_.lookupOrDefault<word>("rhoName", "rho"))
|
||||
{
|
||||
initialise();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::MRFSource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
)
|
||||
{
|
||||
if (eqn.dimensions() == dimForce)
|
||||
{
|
||||
const volScalarField& rho =
|
||||
mesh_.lookupObject<volScalarField>(rhoName_);
|
||||
|
||||
// use 'true' flag to add to rhs of equation
|
||||
mrfPtr_->addCoriolis(rho, eqn, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// use 'true' flag to add to rhs of equation
|
||||
mrfPtr_->addCoriolis(eqn, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFSource::relativeFlux(surfaceScalarField& phi) const
|
||||
{
|
||||
mrfPtr_->relativeFlux(phi);
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFSource::relativeFlux
|
||||
(
|
||||
const surfaceScalarField& rho,
|
||||
surfaceScalarField& phi
|
||||
) const
|
||||
{
|
||||
mrfPtr_->relativeFlux(rho, phi);
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFSource::absoluteFlux(surfaceScalarField& phi) const
|
||||
{
|
||||
mrfPtr_->absoluteFlux(phi);
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFSource::absoluteFlux
|
||||
(
|
||||
const surfaceScalarField& rho,
|
||||
surfaceScalarField& phi
|
||||
) const
|
||||
{
|
||||
mrfPtr_->absoluteFlux(rho, phi);
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFSource::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::MRFSource::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
{
|
||||
coeffs_.readIfPresent("UName", UName_);
|
||||
coeffs_.readIfPresent("rhoName", rhoName_);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
173
src/fieldSources/derived/MRFSource/MRFSource.H
Normal file
173
src/fieldSources/derived/MRFSource/MRFSource.H
Normal file
@ -0,0 +1,173 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::MRFSource
|
||||
|
||||
Description
|
||||
Multiple Reference Frame (MRF) source
|
||||
|
||||
Example usage:
|
||||
|
||||
MRFSourceCoeffs
|
||||
{
|
||||
origin (0 0 0);
|
||||
axis (0 0 1);
|
||||
omega 104.72;
|
||||
}
|
||||
|
||||
SourceFiles
|
||||
MRFSource.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef MRFSource_H
|
||||
#define MRFSource_H
|
||||
|
||||
#include "basicSource.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
class MRFZone;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class MRFSource Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class MRFSource
|
||||
:
|
||||
public basicSource
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Run-time selectable porosity model
|
||||
autoPtr<MRFZone> mrfPtr_;
|
||||
|
||||
//- Velocity field name, default = U
|
||||
word UName_;
|
||||
|
||||
//- Density field name, default = rho
|
||||
word rhoName_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Initialise
|
||||
void initialise();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
MRFSource(const MRFSource&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const MRFSource&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("MRFSource");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
MRFSource
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~MRFSource()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Add explicit and implicit contributions
|
||||
|
||||
//- Vector
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
);
|
||||
|
||||
|
||||
// Flux manipulations
|
||||
|
||||
//- Make the given absolute flux relative
|
||||
virtual void relativeFlux(surfaceScalarField& phi) const;
|
||||
|
||||
//- Make the given absolute mass-flux relative
|
||||
virtual void relativeFlux
|
||||
(
|
||||
const surfaceScalarField& rho,
|
||||
surfaceScalarField& phi
|
||||
) const;
|
||||
|
||||
//- Make the given relative flux absolute
|
||||
virtual void absoluteFlux(surfaceScalarField& phi) const;
|
||||
|
||||
//- Make the given relative mass-flux absolute
|
||||
virtual void absoluteFlux
|
||||
(
|
||||
const surfaceScalarField& rho,
|
||||
surfaceScalarField& phi
|
||||
) const;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write data
|
||||
virtual void writeData(Ostream&) const;
|
||||
|
||||
//- Read dictionary
|
||||
virtual bool read(const dictionary& dict);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,145 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "explicitPorositySource.H"
|
||||
#include "fvMesh.H"
|
||||
#include "fvMatrices.H"
|
||||
#include "porosityModel.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(explicitPorositySource, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
basicSource,
|
||||
explicitPorositySource,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
void Foam::explicitPorositySource::initialise()
|
||||
{
|
||||
if (selectionMode_ != smCellZone)
|
||||
{
|
||||
FatalErrorIn("void Foam::explicitPorositySource::initialise()")
|
||||
<< "The porosity region must be specified as a cellZone. Current "
|
||||
<< "selection mode is " << selectionModeTypeNames_[selectionMode_]
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
porosityPtr_.reset
|
||||
(
|
||||
porosityModel::New
|
||||
(
|
||||
name_,
|
||||
mesh_,
|
||||
coeffs_,
|
||||
cellSetName_
|
||||
).ptr()
|
||||
),
|
||||
|
||||
fieldNames_.setSize(1, UName_);
|
||||
applied_.setSize(1, false);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::explicitPorositySource::explicitPorositySource
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
basicSource(name, modelType, dict, mesh),
|
||||
porosityPtr_(NULL),
|
||||
UName_(coeffs_.lookupOrDefault<word>("UName", "U")),
|
||||
rhoName_(coeffs_.lookupOrDefault<word>("rhoName", "rho")),
|
||||
muName_(coeffs_.lookupOrDefault<word>("muName", "thermo:mu"))
|
||||
{
|
||||
initialise();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::explicitPorositySource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
)
|
||||
{
|
||||
fvMatrix<vector> porosityEqn(eqn.psi(), eqn.dimensions());
|
||||
|
||||
if (eqn.dimensions() == dimForce)
|
||||
{
|
||||
const volScalarField& rho =
|
||||
mesh_.lookupObject<volScalarField>(rhoName_);
|
||||
const volScalarField& mu = mesh_.lookupObject<volScalarField>(muName_);
|
||||
|
||||
porosityPtr_->addResistance(porosityEqn, rho, mu);
|
||||
}
|
||||
else
|
||||
{
|
||||
porosityPtr_->addResistance(porosityEqn);
|
||||
}
|
||||
|
||||
eqn -= porosityEqn;
|
||||
}
|
||||
|
||||
|
||||
void Foam::explicitPorositySource::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::explicitPorositySource::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
{
|
||||
coeffs_.readIfPresent("UName", UName_);
|
||||
coeffs_.readIfPresent("rhoName", rhoName_);
|
||||
coeffs_.readIfPresent("muName", muName_);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,166 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::explicitPorositySource
|
||||
|
||||
Description
|
||||
Explicit porosity source
|
||||
|
||||
Sources described by, for example using the DarcyForchheimer model:
|
||||
|
||||
explicitPorositySourceCoeffs
|
||||
{
|
||||
type DarcyForchheimer;
|
||||
DarcyForchheimerCoeffs
|
||||
{
|
||||
d d [0 -2 0 0 0 0 0] (5e7 -1000 -1000);
|
||||
f f [0 -1 0 0 0 0 0] (0 0 0);
|
||||
|
||||
coordinateSystem
|
||||
{
|
||||
e1 (0.70710678 0.70710678 0);
|
||||
e2 (0 0 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Note:
|
||||
The porous region must be selected as a cellZone.
|
||||
|
||||
SourceFiles
|
||||
explicitPorositySource.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef explicitPorositySource_H
|
||||
#define explicitPorositySource_H
|
||||
|
||||
#include "basicSource.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
class porosityModel;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class explicitPorositySource Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class explicitPorositySource
|
||||
:
|
||||
public basicSource
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Run-time selectable porosity model
|
||||
autoPtr<porosityModel> porosityPtr_;
|
||||
|
||||
//- Velocity field name, default = U
|
||||
word UName_;
|
||||
|
||||
//- Density field name (compressible case only), default = rho
|
||||
word rhoName_;
|
||||
|
||||
//- Dynamic viscosity field name (compressible case only)
|
||||
// default = thermo:mu
|
||||
word muName_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Initialise
|
||||
void initialise();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
explicitPorositySource(const explicitPorositySource&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const explicitPorositySource&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("explicitPorositySource");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
explicitPorositySource
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~explicitPorositySource()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Add explicit and implicit contributions
|
||||
|
||||
//- Vector
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
);
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write data
|
||||
virtual void writeData(Ostream&) const;
|
||||
|
||||
//- Read dictionary
|
||||
virtual bool read(const dictionary& dict);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -32,13 +32,12 @@ Description
|
||||
|
||||
fixedTemperatureSourceCoeffs
|
||||
{
|
||||
fieldNames (h e hs); // names of fields to apply source
|
||||
mode uniform; // constant or lookup
|
||||
mode uniform; // uniform or lookup
|
||||
|
||||
// uniform option
|
||||
temperature constant 500; // fixed temperature [K]
|
||||
temperature constant 500; // fixed temperature with time [K]
|
||||
|
||||
// loolup option
|
||||
// lookup option
|
||||
// TName T; // optional temperature field name
|
||||
}
|
||||
|
||||
|
||||
@ -230,15 +230,16 @@ Foam::MRFZone::MRFZone
|
||||
(
|
||||
const word& name,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
const word& cellZoneName
|
||||
)
|
||||
:
|
||||
mesh_(mesh),
|
||||
name_(name),
|
||||
coeffs_(dict),
|
||||
active_(readBool(coeffs_.lookup("active"))),
|
||||
cellZoneName_(coeffs_.lookup("cellZone")),
|
||||
cellZoneID_(mesh_.cellZones().findZoneID(cellZoneName_)),
|
||||
active_(true),
|
||||
cellZoneName_(cellZoneName),
|
||||
cellZoneID_(),
|
||||
excludedPatchNames_
|
||||
(
|
||||
coeffs_.lookupOrDefault("nonRotatingPatches", wordList(0))
|
||||
@ -247,12 +248,20 @@ Foam::MRFZone::MRFZone
|
||||
axis_(coeffs_.lookup("axis")),
|
||||
omega_(DataEntry<scalar>::New("omega", coeffs_))
|
||||
{
|
||||
if (cellZoneName_ == word::null)
|
||||
{
|
||||
coeffs_.lookup("active") >> active_;
|
||||
coeffs_.lookup("cellZone") >> cellZoneName_;
|
||||
}
|
||||
|
||||
if (!active_)
|
||||
{
|
||||
cellZoneID_ = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cellZoneID_ = mesh_.cellZones().findZoneID(cellZoneName_);
|
||||
|
||||
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||
|
||||
axis_ = axis_/mag(axis_);
|
||||
@ -268,7 +277,13 @@ Foam::MRFZone::MRFZone
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"MRFZone(const word&, const fvMesh&, const dictionary&)"
|
||||
"MRFZone"
|
||||
"("
|
||||
"const word&, "
|
||||
"const fvMesh&, "
|
||||
"const dictionary&, "
|
||||
"const word&"
|
||||
")"
|
||||
)
|
||||
<< "cannot find MRF patch " << excludedPatchNames_[i]
|
||||
<< exit(FatalError);
|
||||
@ -283,7 +298,13 @@ Foam::MRFZone::MRFZone
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"MRFZone(const word&, const fvMesh&, const dictionary&)"
|
||||
"MRFZone"
|
||||
"("
|
||||
"const word&, "
|
||||
"const fvMesh&, "
|
||||
"const dictionary&, "
|
||||
"const word&"
|
||||
")"
|
||||
)
|
||||
<< "cannot find MRF cellZone " << cellZoneName_
|
||||
<< exit(FatalError);
|
||||
@ -328,7 +349,7 @@ void Foam::MRFZone::addCoriolis
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFZone::addCoriolis(fvVectorMatrix& UEqn) const
|
||||
void Foam::MRFZone::addCoriolis(fvVectorMatrix& UEqn, const bool rhs) const
|
||||
{
|
||||
if (cellZoneID_ == -1)
|
||||
{
|
||||
@ -342,18 +363,30 @@ void Foam::MRFZone::addCoriolis(fvVectorMatrix& UEqn) const
|
||||
|
||||
const vector Omega = this->Omega();
|
||||
|
||||
if (rhs)
|
||||
{
|
||||
forAll(cells, i)
|
||||
{
|
||||
label celli = cells[i];
|
||||
Usource[celli] += V[celli]*(Omega ^ U[celli]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
forAll(cells, i)
|
||||
{
|
||||
label celli = cells[i];
|
||||
Usource[celli] -= V[celli]*(Omega ^ U[celli]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFZone::addCoriolis
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvVectorMatrix& UEqn
|
||||
fvVectorMatrix& UEqn,
|
||||
const bool rhs
|
||||
) const
|
||||
{
|
||||
if (cellZoneID_ == -1)
|
||||
@ -368,12 +401,23 @@ void Foam::MRFZone::addCoriolis
|
||||
|
||||
const vector Omega = this->Omega();
|
||||
|
||||
if (rhs)
|
||||
{
|
||||
forAll(cells, i)
|
||||
{
|
||||
label celli = cells[i];
|
||||
Usource[celli] += V[celli]*rho[celli]*(Omega ^ U[celli]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
forAll(cells, i)
|
||||
{
|
||||
label celli = cells[i];
|
||||
Usource[celli] -= V[celli]*rho[celli]*(Omega ^ U[celli]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFZone::relativeVelocity(volVectorField& U) const
|
||||
|
||||
@ -144,7 +144,13 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct from fvMesh
|
||||
MRFZone(const word& name, const fvMesh& mesh, const dictionary& dict);
|
||||
MRFZone
|
||||
(
|
||||
const word& name,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict,
|
||||
const word& cellZoneName = word::null
|
||||
);
|
||||
|
||||
//- Return clone
|
||||
autoPtr<MRFZone> clone() const
|
||||
@ -185,13 +191,20 @@ public:
|
||||
) const;
|
||||
|
||||
//- Add the Coriolis force contribution to the momentum equation
|
||||
void addCoriolis(fvVectorMatrix& UEqn) const;
|
||||
// Adds to the lhs of the equation; optionally add to rhs
|
||||
void addCoriolis
|
||||
(
|
||||
fvVectorMatrix& UEqn,
|
||||
const bool rhs = false
|
||||
) const;
|
||||
|
||||
//- Add the Coriolis force contribution to the momentum equation
|
||||
// Adds to the lhs of the equation; optionally add to rhs
|
||||
void addCoriolis
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvVectorMatrix& UEqn
|
||||
fvVectorMatrix& UEqn,
|
||||
const bool rhs = false
|
||||
) const;
|
||||
|
||||
//- Make the given absolute velocity relative within the MRF region
|
||||
|
||||
@ -47,10 +47,11 @@ Foam::porosityModels::DarcyForchheimer::DarcyForchheimer
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
const word& cellZoneName
|
||||
)
|
||||
:
|
||||
porosityModel(name, modelType, mesh, dict),
|
||||
porosityModel(name, modelType, mesh, dict, cellZoneName),
|
||||
coordSys_(coeffs_, mesh),
|
||||
D_("D", dimless/sqr(dimLength), tensor::zero),
|
||||
F_("F", dimless/dimLength, tensor::zero),
|
||||
|
||||
@ -136,7 +136,8 @@ public:
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
const word& cellZoneName
|
||||
);
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -102,10 +102,11 @@ Foam::porosityModels::fixedCoeff::fixedCoeff
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
const word& cellZoneName
|
||||
)
|
||||
:
|
||||
porosityModel(name, modelType, mesh, dict),
|
||||
porosityModel(name, modelType, mesh, dict, cellZoneName),
|
||||
coordSys_(coeffs_, mesh),
|
||||
alpha_("alpha", dimless/dimTime, tensor::zero),
|
||||
beta_("beta", dimless/dimLength, tensor::zero)
|
||||
|
||||
@ -113,7 +113,8 @@ public:
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
const word& cellZoneName
|
||||
);
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -73,17 +73,26 @@ Foam::porosityModel::porosityModel
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
const word& cellZoneName
|
||||
)
|
||||
:
|
||||
name_(name),
|
||||
mesh_(mesh),
|
||||
dict_(dict),
|
||||
coeffs_(dict.subDict(modelType + "Coeffs")),
|
||||
active_(readBool(dict_.lookup("active"))),
|
||||
zoneName_(dict_.lookup("cellZone")),
|
||||
cellZoneIds_(mesh_.cellZones().findIndices(zoneName_))
|
||||
active_(true),
|
||||
zoneName_(cellZoneName),
|
||||
cellZoneIds_()
|
||||
{
|
||||
if (zoneName_ == word::null)
|
||||
{
|
||||
dict.lookup("actuve") >> active_;
|
||||
dict_.lookup("cellZone") >> zoneName_;
|
||||
}
|
||||
|
||||
cellZoneIds_ = mesh_.cellZones().findIndices(zoneName_);
|
||||
|
||||
Info<< " creating porous zone: " << zoneName_ << endl;
|
||||
|
||||
bool foundZone = !cellZoneIds_.empty();
|
||||
@ -99,6 +108,7 @@ Foam::porosityModel::porosityModel
|
||||
"const word&, "
|
||||
"const fvMesh&, "
|
||||
"const dictionary&"
|
||||
"const word&, "
|
||||
")"
|
||||
) << "cannot find porous cellZone " << zoneName_
|
||||
<< exit(FatalError);
|
||||
|
||||
@ -127,9 +127,10 @@ public:
|
||||
const word& modelName,
|
||||
const word& name,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
const word& cellZoneName
|
||||
),
|
||||
(modelName, name, mesh, dict)
|
||||
(modelName, name, mesh, dict, cellZoneName)
|
||||
);
|
||||
|
||||
//- Constructor
|
||||
@ -138,7 +139,8 @@ public:
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
const word& cellZoneName = word::null
|
||||
);
|
||||
|
||||
//- Return pointer to new porosityModel object created on the freestore
|
||||
@ -182,7 +184,8 @@ public:
|
||||
(
|
||||
const word& name,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
const word& cellZoneName = word::null
|
||||
);
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -31,7 +31,8 @@ Foam::autoPtr<Foam::porosityModel> Foam::porosityModel::New
|
||||
(
|
||||
const word& name,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
const word& cellZoneName
|
||||
)
|
||||
{
|
||||
const word modelType(dict.lookup("type"));
|
||||
@ -48,9 +49,10 @@ Foam::autoPtr<Foam::porosityModel> Foam::porosityModel::New
|
||||
(
|
||||
"porosityModel::New"
|
||||
"("
|
||||
"const word& name,"
|
||||
"const word&, "
|
||||
"const fvMesh&, "
|
||||
"const dictionary&"
|
||||
"const dictionary&, "
|
||||
"const word&"
|
||||
")"
|
||||
)
|
||||
<< "Unknown " << typeName << " type " << modelType << nl << nl
|
||||
@ -59,7 +61,17 @@ Foam::autoPtr<Foam::porosityModel> Foam::porosityModel::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<porosityModel>(cstrIter()(name, modelType, mesh, dict));
|
||||
return autoPtr<porosityModel>
|
||||
(
|
||||
cstrIter()
|
||||
(
|
||||
name,
|
||||
modelType,
|
||||
mesh,
|
||||
dict,
|
||||
cellZoneName
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -47,10 +47,11 @@ Foam::porosityModels::powerLaw::powerLaw
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
const word& cellZoneName
|
||||
)
|
||||
:
|
||||
porosityModel(name, modelType, mesh, dict),
|
||||
porosityModel(name, modelType, mesh, dict, cellZoneName),
|
||||
C0_(readScalar(coeffs_.lookup("C0"))),
|
||||
C1_(readScalar(coeffs_.lookup("C1"))),
|
||||
rhoName_(coeffs_.lookupOrDefault<word>("rho", "rho"))
|
||||
|
||||
@ -117,7 +117,8 @@ public:
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
const word& cellZoneName
|
||||
);
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -11,16 +11,23 @@ FoamFile
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object porosityProperties;
|
||||
object sourcesProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
porosity1
|
||||
{
|
||||
type DarcyForchheimer;
|
||||
active yes;
|
||||
type explicitPorositySource;
|
||||
active true;
|
||||
timeStart 0;
|
||||
duration 1000000;
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
|
||||
explicitPorositySourceCoeffs
|
||||
{
|
||||
type DarcyForchheimer;
|
||||
|
||||
DarcyForchheimerCoeffs
|
||||
{
|
||||
d d [0 -2 0 0 0 0 0] (5e7 -1000 -1000);
|
||||
@ -33,5 +40,7 @@ porosity1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
************************************************************************* //
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoPorousMRFLTSPimpleFoam;
|
||||
application rhoLTSPimpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoPorousMRFPimpleFoam;
|
||||
application rhoPimpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
@ -1 +0,0 @@
|
||||
../angledDuctImplicit/0
|
||||
@ -1 +0,0 @@
|
||||
../angledDuctImplicit/Allrun
|
||||
@ -1,20 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object MRFProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// none
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,20 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object MRFProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// none
|
||||
|
||||
// ************************************************************************* //
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user