Skip to content
Snippets Groups Projects
Commit 69c93be1 authored by andy's avatar andy
Browse files

ENH: Further addition of run-time selectable sources to solvers

parent c6c1fdbe
Branches
Tags
No related merge requests found
......@@ -7,7 +7,10 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fieldSources/lnInclude
EXE_LIBS = \
-lengine \
......@@ -16,4 +19,7 @@ EXE_LIBS = \
-lcompressibleLESModels \
-lfluidThermophysicalModels \
-lspecie \
-lfiniteVolume
-lfiniteVolume \
-lsampling \
-lmeshTools \
-lfieldSources
......@@ -35,6 +35,7 @@ Description
#include "psiThermo.H"
#include "turbulenceModel.H"
#include "OFstream.H"
#include "IObasicSourceList.H"
#include "pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -69,3 +69,6 @@
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
Info<< "Creating sources\n" << endl;
IObasicSourceList sources(mesh);
......@@ -2,7 +2,10 @@ EXE_INC = \
-I../../compressible/rhoPimpleFoam \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fieldSources/lnInclude \
EXE_LIBS = \
-lmeshTools \
......@@ -11,4 +14,8 @@ EXE_LIBS = \
-lcompressibleTurbulenceModel \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lfiniteVolume
-lfiniteVolume \
-lsampling \
-lmeshTools \
-lfieldSources
......@@ -22,6 +22,7 @@
- fvc::snGrad(p_rgh)
)*mesh.magSf()
)
+ sources(rho, U)
);
K = 0.5*magSqr(U);
}
......@@ -37,6 +37,7 @@ Description
#include "rhoThermo.H"
#include "turbulenceModel.H"
#include "fixedGradientFvPatchFields.H"
#include "IObasicSourceList.H"
#include "pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -89,3 +89,6 @@
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
Info<< "Creating sources\n" << endl;
IObasicSourceList sources(mesh);
......@@ -9,7 +9,7 @@
surfaceScalarField rhorAUf("Dp", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
HbyA = rAU*(UEqn == sources(rho, U))().H();
surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
......@@ -28,6 +28,8 @@
(
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
+ fvc::div(phiHbyA)
==
sources(psi, p, rho.name())
);
while (pimple.correctNonOrthogonal())
......@@ -38,6 +40,8 @@
- fvm::laplacian(rhorAUf, p_rgh)
);
sources.constrain(p_rghEqn, rho.name());
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
......@@ -52,6 +56,7 @@
// calculated from the relaxed pressure
U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf);
U.correctBoundaryConditions();
sources.correct(U);
K = 0.5*magSqr(U);
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment