mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
tidying up
This commit is contained in:
@ -63,14 +63,10 @@ void spray::inject()
|
|||||||
{
|
{
|
||||||
Np = max(1, Np);
|
Np = max(1, Np);
|
||||||
scalar mp = mass/Np/nHoles;
|
scalar mp = mass/Np/nHoles;
|
||||||
|
|
||||||
// constT is only larger than zero for the first
|
// constT is only larger than zero for the first
|
||||||
// part of the injection
|
// part of the injection
|
||||||
scalar constT = max
|
scalar constT = max(0.0, it->tsoi() - time0);
|
||||||
(
|
|
||||||
0.0,
|
|
||||||
it->tsoi() - time0
|
|
||||||
);
|
|
||||||
|
|
||||||
// deltaT is the duration of injection during this timestep
|
// deltaT is the duration of injection during this timestep
|
||||||
scalar deltaT = min
|
scalar deltaT = min
|
||||||
@ -103,9 +99,10 @@ void spray::inject()
|
|||||||
axisOfWedgeNormal_,
|
axisOfWedgeNormal_,
|
||||||
rndGen_
|
rndGen_
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar diameter = injection().d0(i, toi);
|
scalar diameter = injection().d0(i, toi);
|
||||||
vector direction = injection().direction(i, n, toi, diameter);
|
vector direction =
|
||||||
|
injection().direction(i, n, toi, diameter);
|
||||||
vector U = injection().velocity(i, toi)*direction;
|
vector U = injection().velocity(i, toi)*direction;
|
||||||
|
|
||||||
scalar symComponent = direction & axisOfSymmetry_;
|
scalar symComponent = direction & axisOfSymmetry_;
|
||||||
@ -117,13 +114,13 @@ void spray::inject()
|
|||||||
scalar ddev = breakup().yDot0();
|
scalar ddev = breakup().yDot0();
|
||||||
|
|
||||||
label injectorCell = mesh_.findCell(injectionPosition);
|
label injectorCell = mesh_.findCell(injectionPosition);
|
||||||
|
|
||||||
# include "findInjectorCell.H"
|
# include "findInjectorCell.H"
|
||||||
|
|
||||||
if (injectorCell >= 0)
|
if (injectorCell >= 0)
|
||||||
{
|
{
|
||||||
scalar liquidCore = 1.0;
|
scalar liquidCore = 1.0;
|
||||||
|
|
||||||
// construct the parcel that is to be injected
|
// construct the parcel that is to be injected
|
||||||
|
|
||||||
parcel* pPtr = new parcel
|
parcel* pPtr = new parcel
|
||||||
@ -148,19 +145,16 @@ void spray::inject()
|
|||||||
fuels_->components()
|
fuels_->components()
|
||||||
);
|
);
|
||||||
|
|
||||||
injectedLiquidKE_ += 0.5*pPtr->m()*pow(mag(U), 2.0);
|
injectedLiquidKE_ += 0.5*pPtr->m()*magSqr(U);
|
||||||
|
|
||||||
scalar dt = time - toi;
|
scalar dt = time - toi;
|
||||||
|
|
||||||
pPtr->stepFraction() =
|
pPtr->stepFraction() =
|
||||||
(runTime_.deltaT().value() - dt)
|
(runTime_.deltaT().value() - dt)
|
||||||
/runTime_.deltaT().value();
|
/runTime_.deltaT().value();
|
||||||
|
|
||||||
bool keepParcel = pPtr->move
|
bool keepParcel = pPtr->move(*this);
|
||||||
(
|
|
||||||
*this
|
|
||||||
);
|
|
||||||
|
|
||||||
if (keepParcel)
|
if (keepParcel)
|
||||||
{
|
{
|
||||||
addParticle(pPtr);
|
addParticle(pPtr);
|
||||||
|
|||||||
@ -65,7 +65,7 @@ void spray::evolve()
|
|||||||
inject();
|
inject();
|
||||||
atomizationLoop();
|
atomizationLoop();
|
||||||
breakupLoop();
|
breakupLoop();
|
||||||
|
|
||||||
UInterpolator_.clear();
|
UInterpolator_.clear();
|
||||||
rhoInterpolator_.clear();
|
rhoInterpolator_.clear();
|
||||||
pInterpolator_.clear();
|
pInterpolator_.clear();
|
||||||
@ -89,12 +89,7 @@ void spray::move()
|
|||||||
|
|
||||||
void spray::breakupLoop()
|
void spray::breakupLoop()
|
||||||
{
|
{
|
||||||
for
|
forAllIter(spray::iterator, *this, elmnt)
|
||||||
(
|
|
||||||
spray::iterator elmnt = begin();
|
|
||||||
elmnt != end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// interpolate...
|
// interpolate...
|
||||||
vector velocity = UInterpolator().interpolate
|
vector velocity = UInterpolator().interpolate
|
||||||
@ -128,12 +123,7 @@ void spray::breakupLoop()
|
|||||||
|
|
||||||
void spray::atomizationLoop()
|
void spray::atomizationLoop()
|
||||||
{
|
{
|
||||||
for
|
forAllIter(spray::iterator, *this, elmnt)
|
||||||
(
|
|
||||||
spray::iterator elmnt = begin();
|
|
||||||
elmnt != end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// interpolate...
|
// interpolate...
|
||||||
vector velocity = UInterpolator().interpolate
|
vector velocity = UInterpolator().interpolate
|
||||||
|
|||||||
Reference in New Issue
Block a user