Skip to content
Snippets Groups Projects
Commit 8b59f1d0 authored by Mark Olesen's avatar Mark Olesen
Browse files

Merge remote branch 'OpenCFD/master' into olesenm

parents d5acd22a 9c350ab5
Branches
Tags
No related merge requests found
Showing
with 83 additions and 54 deletions
......@@ -51,6 +51,18 @@
As 1.4792e-06;
Ts 116;
}
*** Lagrangian intermediate library
Extensively updated
*Updated* input format
Extended to include steady cloud tracking
*New* collision modelling
*Coupled* to new surface film modelling library
*New* sub-models
+ NonSphereDrag: drag model to account for non-spherical particles
+ ParticleTracks: post-processing model to generate track data, typically
during steady calculations
*Updated* sub-models
+ Devolatilisation models: now act on a per-specie basis
*** DSMC
*** Dynamic Mesh
......@@ -106,6 +118,8 @@
*** *New* Solvers
+ =reactingParcelFilmFoam=: Lagrangian cloud and film transport in a
reacting gas phase system
+ =steadyReactingParcelFoam=: Steady solution of cloud and reacting systems
using local time stepping methods
*** Modifications to multiphase and buoyant solvers
+ ...
*** Modifications to solvers for sensible enthalpy
......@@ -149,6 +163,8 @@
field data.
+ =singleCellMesh=: new utility to convert mesh and fields to a single cell
mesh. Great for postprocessing.
+ =steadyParticleTracks=: Generates VTK tracks from the output of the cloud
=ParticleTracks= post-processing sub-model
+ Function objects:
+ =residualControl=: new function object to allow users to terminate steady
state calculations when the defined residual levels are achieved
......
......@@ -11,7 +11,7 @@
if (turbulentReaction)
{
volScalarField tk =
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon());
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon());
volScalarField tc = chemistry.tc();
// Chalmers PaSR model
......
......@@ -31,7 +31,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicPsiThermo.H"
#include "basicRhoThermo.H"
#include "turbulenceModel.H"
#include "fixedGradientFvPatchFields.H"
#include "regionProperties.H"
......@@ -121,7 +121,7 @@ int main(int argc, char *argv[])
<< nl << endl;
}
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}
......
......@@ -30,7 +30,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicPsiThermo.H"
#include "basicRhoThermo.H"
#include "turbulenceModel.H"
#include "fixedGradientFvPatchFields.H"
#include "regionProperties.H"
......
// Initialise fluid field pointer lists
PtrList<basicPsiThermo> thermoFluid(fluidRegions.size());
PtrList<basicRhoThermo> thermoFluid(fluidRegions.size());
PtrList<volScalarField> rhoFluid(fluidRegions.size());
PtrList<volScalarField> KFluid(fluidRegions.size());
PtrList<volVectorField> UFluid(fluidRegions.size());
......@@ -28,7 +28,7 @@
thermoFluid.set
(
i,
basicPsiThermo::New(fluidRegions[i]).ptr()
basicRhoThermo::New(fluidRegions[i]).ptr()
);
Info<< " Adding to rhoFluid\n" << endl;
......
{
// From buoyantSimpleFoam
rho = thermo.rho();
rho = max(rho, rhoMin[i]);
rho = min(rho, rhoMax[i]);
......@@ -13,6 +12,8 @@
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
bool closedVolume = adjustPhi(phi, U, p_rgh);
dimensionedScalar compressibility = fvc::domainIntegrate(psi);
bool compressible = (compressibility.value() > SMALL);
surfaceScalarField buoyancyPhi = rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf();
phi -= buoyancyPhi;
......@@ -25,7 +26,11 @@
fvm::laplacian(rhorAUf, p_rgh) == fvc::div(phi)
);
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.setReference
(
pRefCell,
compressible ? getRefCellValue(p_rgh, pRefCell) : pRefValue
);
p_rghEqn.solve();
......@@ -50,10 +55,10 @@
// For closed-volume cases adjust the pressure level
// to obey overall mass continuity
if (closedVolume)
if (closedVolume && compressible)
{
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
p += (initialMass - fvc::domainIntegrate(thermo.rho()))
/compressibility;
p_rgh = p - rho*gh;
}
......
const fvMesh& mesh = fluidRegions[i];
basicPsiThermo& thermo = thermoFluid[i];
basicRhoThermo& thermo = thermoFluid[i];
volScalarField& rho = rhoFluid[i];
volScalarField& K = KFluid[i];
volVectorField& U = UFluid[i];
......
......@@ -34,16 +34,13 @@ Foam::scalar Foam::compressibleCourantNo
const surfaceScalarField& phi
)
{
scalar CoNum = 0.0;
scalar meanCoNum = 0.0;
scalarField sumPhi =
fvc::surfaceSum(mag(phi))().internalField()
/rho.internalField();
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
scalar CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
meanCoNum =
scalar meanCoNum =
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
Info<< "Region: " << mesh.name() << " Courant Number mean: " << meanCoNum
......
// Initialise fluid field pointer lists
PtrList<basicPsiThermo> thermoFluid(fluidRegions.size());
PtrList<basicRhoThermo> thermoFluid(fluidRegions.size());
PtrList<volScalarField> rhoFluid(fluidRegions.size());
PtrList<volScalarField> KFluid(fluidRegions.size());
PtrList<volVectorField> UFluid(fluidRegions.size());
......@@ -23,7 +23,7 @@
thermoFluid.set
(
i,
basicPsiThermo::New(fluidRegions[i]).ptr()
basicRhoThermo::New(fluidRegions[i]).ptr()
);
Info<< " Adding to rhoFluid\n" << endl;
......
{
bool closedVolume = p_rgh.needReference();
dimensionedScalar compressibility = fvc::domainIntegrate(psi);
bool compressible = (compressibility.value() > SMALL);
rho = thermo.rho();
......@@ -19,34 +21,48 @@
phi = phiU - rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf();
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix p_rghEqn
fvScalarMatrix p_rghDDtEqn
(
fvm::ddt(psi, p_rgh) + fvc::ddt(psi, rho)*gh
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
+ fvc::div(phi)
- fvm::laplacian(rhorAUf, p_rgh)
);
p_rghEqn.solve
(
mesh.solver
// Thermodynamic density needs to be updated by psi*d(p) after the
// pressure solution - done in 2 parts. Part 1:
thermo.rho() -= psi*p_rgh;
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix p_rghEqn
(
p_rghDDtEqn
- fvm::laplacian(rhorAUf, p_rgh)
);
p_rghEqn.solve
(
p_rgh.select
mesh.solver
(
p_rgh.select
(
oCorr == nOuterCorr-1
&& corr == nCorr-1
&& nonOrth == nNonOrthCorr
(
oCorr == nOuterCorr-1
&& corr == nCorr-1
&& nonOrth == nNonOrthCorr
)
)
)
)
);
);
if (nonOrth == nNonOrthCorr)
{
phi += p_rghEqn.flux();
if (nonOrth == nNonOrthCorr)
{
phi += p_rghEqn.flux();
}
}
// Second part of thermodynamic density update
thermo.rho() += psi*p_rgh;
}
// Correct velocity field
......@@ -66,10 +82,10 @@
// For closed-volume cases adjust the pressure and density levels
// to obey overall mass continuity
if (closedVolume)
if (closedVolume && compressible)
{
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
p += (initialMass - fvc::domainIntegrate(thermo.rho()))
/compressibility;
rho = thermo.rho();
p_rgh = p - rho*gh;
}
......
fvMesh& mesh = fluidRegions[i];
basicPsiThermo& thermo = thermoFluid[i];
basicRhoThermo& thermo = thermoFluid[i];
volScalarField& rho = rhoFluid[i];
volScalarField& K = KFluid[i];
volVectorField& U = UFluid[i];
......
const dictionary& piso = solidRegions[i].solutionDict().subDict("PISO");
const int nNonOrthCorr =
piso.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
......@@ -5,8 +5,8 @@
+ turbulence->divDevRhoReff(U)
==
rho.dimensionedInternalField()*g
+ coalParcels.SU()
+ limestoneParcels.SU()
+ coalParcels.SU(U)
+ limestoneParcels.SU(U)
);
UEqn.relax();
......
......@@ -25,7 +25,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
==
coalParcels.Srho(i)
coalParcels.SYi(i, Yi)
+ kappa*chemistry.RR(i)().dimensionedInternalField()
);
......
......@@ -6,8 +6,8 @@
- fvm::laplacian(turbulence->alphaEff(), hs)
==
DpDt
+ coalParcels.Sh()
+ limestoneParcels.Sh()
+ coalParcels.Sh(hs)
+ limestoneParcels.Sh(hs)
+ enthalpySource.Su()
+ radiation->Shs(thermo)
+ chemistrySh
......
......@@ -35,7 +35,7 @@ Description
fvm::ddt(rho)
+ fvc::div(phi)
==
coalParcels.Srho()
coalParcels.Srho(rho)
);
}
......
......@@ -51,7 +51,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
# include "createDynamicFvMesh.H"
#include "createDynamicFvMesh.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
......
......@@ -6,7 +6,7 @@
+ turbulence->divDevRhoReff(U)
==
rho.dimensionedInternalField()*g
+ parcels.SU()
+ parcels.SU(U)
+ momentumSource.Su()
);
......
......@@ -26,7 +26,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
==
parcels.Srho(i)
parcels.SYi(i, Yi)
+ kappa*chemistry.RR(i)().dimensionedInternalField()
+ massSource.Su(i),
mesh.solver("Yi")
......
......@@ -37,7 +37,7 @@
- fvm::laplacian(turbulence->alphaEff(), hs)
==
pWork()
+ parcels.Sh()
+ parcels.Sh(hs)
+ radiation->Shs(thermo)
+ energySource.Su()
+ chemistrySh
......
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