Commit 1a61449d authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: Code updates in lieu of cloud updates

parent 8c3ecd9b
......@@ -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
......
......@@ -35,7 +35,7 @@ Description
fvm::ddt(rho)
+ fvc::div(phi)
==
parcels.Srho()
parcels.Srho(rho)
+ massSource.SuTot()
);
......
......@@ -5,7 +5,7 @@
+ turbulence->divDevRhoReff(U)
==
rho.dimensionedInternalField()*g
+ parcels.SU()
+ parcels.SU(U)
);
UEqn.relax();
......
......@@ -25,7 +25,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
==
parcels.Srho(i)
parcels.SYi(i, Yi)
+ surfaceFilm.Srho(i)
+ kappa*chemistry.RR(i)().dimensionedInternalField(),
mesh.solver("Yi")
......
......@@ -6,7 +6,7 @@
- fvm::laplacian(turbulence->alphaEff(), hs)
==
DpDt
+ parcels.Sh()
+ parcels.Sh(hs)
+ surfaceFilm.Sh()
+ radiation->Shs(thermo)
+ chemistrySh
......
......@@ -35,7 +35,7 @@ Description
fvm::ddt(rho)
+ fvc::div(phi)
==
parcels.Srho()
parcels.Srho(rho)
+ surfaceFilm.Srho()
);
}
......
......@@ -5,7 +5,7 @@
+ turbulence->divDevRhoReff(U)
==
rho.dimensionedInternalField()*g
+ parcels.SU()
+ parcels.SU(U)
);
UEqn.relax();
......
......@@ -25,7 +25,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(),
mesh.solver("Yi")
);
......
......@@ -6,7 +6,7 @@
- fvm::laplacian(turbulence->alphaEff(), hs)
==
DpDt
+ parcels.Sh()
+ parcels.Sh(hs)
+ radiation->Shs(thermo)
+ chemistrySh
);
......
......@@ -35,7 +35,7 @@ Description
fvm::ddt(rho)
+ fvc::div(phi)
==
parcels.Srho()
parcels.Srho(rho)
);
}
......
......@@ -327,7 +327,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
const PtrList<PatchField<Type> >& ptfl
)
:
DimensionedField<Type, GeoMesh>(io, mesh, ds, iField, false),
DimensionedField<Type, GeoMesh>(io, mesh, ds, iField),
timeIndex_(this->time().timeIndex()),
field0Ptr_(NULL),
fieldPrevIterPtr_(NULL),
......
......@@ -94,14 +94,13 @@ Foam::parcel::parcel
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::parcel::move(spray& sDB)
bool Foam::parcel::move(spray& sDB, const scalar trackTime)
{
const polyMesh& mesh = cloud().pMesh();
const polyBoundaryMesh& pbMesh = mesh.boundaryMesh();
const liquidMixture& fuels = sDB.fuels();
scalar deltaT = sDB.runTime().deltaTValue();
label Nf = fuels.components().size();
label Ns = sDB.composition().Y().size();
......@@ -156,12 +155,12 @@ bool Foam::parcel::move(spray& sDB)
pg,
Yfg,
m()*fuels.Y(X()),
deltaT
trackTime
);
// set the end-time for the track
scalar tEnd = (1.0 - stepFraction())*deltaT;
scalar tEnd = (1.0 - stepFraction())*trackTime;
// set the maximum time step for this parcel
scalar dtMax = min
......@@ -215,7 +214,7 @@ bool Foam::parcel::move(spray& sDB)
tEnd -= dt;
// Set the current time-step fraction.
stepFraction() = 1.0 - tEnd/deltaT;
stepFraction() = 1.0 - tEnd/trackTime;
if (onBoundary()) // hit face
{
......
......@@ -349,7 +349,7 @@ public:
// Parcel operations
bool move(spray& sprayData);
bool move(spray& sprayData, const scalar trackTime);
//- Transform the position and physical properties of the particle
// according to the given transformation tensor
......
......@@ -159,7 +159,8 @@ void Foam::spray::inject()
(runTime_.deltaTValue() - dt)
/runTime_.deltaTValue();
bool keepParcel = pPtr->move(*this);
bool keepParcel =
pPtr->move(*this, runTime_.deltaTValue());
if (keepParcel)
{
......
......@@ -76,7 +76,7 @@ void Foam::spray::move()
srhos_[i] = 0.0;
}
Cloud<parcel>::move(*this);
Cloud<parcel>::move(*this, runTime_.deltaTValue());
}
......
......@@ -984,7 +984,7 @@ void Foam::DsmcCloud<ParcelType>::evolve()
this->inflowBoundary().inflow();
// Move the particles ballistically with their current velocities
Cloud<ParcelType>::move(td);
Cloud<ParcelType>::move(td, mesh_.time().deltaTValue());
// Update cell occupancy
buildCellOccupancy();
......
......@@ -32,7 +32,8 @@ template<class ParcelType>
template<class TrackData>
bool Foam::DsmcParcel<ParcelType>::move
(
TrackData& td
TrackData& td,
const scalar trackTime
)
{
ParcelType& p = static_cast<ParcelType&>(*this);
......@@ -43,8 +44,7 @@ bool Foam::DsmcParcel<ParcelType>::move
const polyMesh& mesh = td.cloud().pMesh();
const polyBoundaryMesh& pbMesh = mesh.boundaryMesh();
const scalar deltaT = mesh.time().deltaTValue();
scalar tEnd = (1.0 - p.stepFraction())*deltaT;
scalar tEnd = (1.0 - p.stepFraction())*trackTime;
const scalar dtMax = tEnd;
// For reduced-D cases, the velocity used to track needs to be
......@@ -71,7 +71,7 @@ bool Foam::DsmcParcel<ParcelType>::move
tEnd -= dt;
p.stepFraction() = 1.0 - tEnd/deltaT;
p.stepFraction() = 1.0 - tEnd/trackTime;
if (p.onBoundary() && td.keepParticle)
{
......
Supports Markdown
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