diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/setrDeltaT.H b/applications/solvers/multiphase/interFoam/LTSInterFoam/setrDeltaT.H index b296187e9eb75a53b185742e61246f53a0f8de84..208d01b4847691c057725fc9a20b8c85d8cb3fab 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/setrDeltaT.H +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/setrDeltaT.H @@ -64,7 +64,7 @@ // Further limit the reciprocal time-step // in the vicinity of the interface - volScalarField alpha1Bar = fvc::average(alpha1); + volScalarField alpha1Bar(fvc::average(alpha1)); rDeltaT.dimensionedInternalField() = max ( diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.C index bd7d2aaab9f4d58d1656eb01b720c09e82676429..7a73cbf338085c6e0fa38d00e9b5bbedda190eb5 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.C @@ -39,8 +39,10 @@ correction { const fvMesh& mesh = this->mesh(); - GeometricField<Type, pointPatchField, pointMesh> pvf = - volPointInterpolation::New(mesh).interpolate(vf); + GeometricField<Type, pointPatchField, pointMesh> pvf + ( + volPointInterpolation::New(mesh).interpolate(vf) + ); tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsfCorr = linearInterpolate(vf); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index 8a4d63100ea2d908afe76d1d9f1f3574de0bde1e..9340f754e762bf599af39f71d9bbc13cf259827f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -607,11 +607,16 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td) pPtr->rho() ); - // Add the new parcel - td.cloud().addParticle(pPtr); - - massAdded += pPtr->nParticle()*pPtr->mass(); - parcelsAdded++; + if (pPtr->move(td, dt)) + { + td.cloud().addParticle(pPtr); + massAdded += pPtr->nParticle()*pPtr->mass(); + parcelsAdded++; + } + else + { + delete pPtr; + } } } }