Skip to content
Snippets Groups Projects
Commit 1d3a9355 authored by Henry's avatar Henry
Browse files

Add conversion to scalar for SP

parent 79bb78c6
Branches
Tags
No related merge requests found
...@@ -116,7 +116,9 @@ ...@@ -116,7 +116,9 @@
&& runTime.timeIndex() > runTime.startTimeIndex() + 1 && runTime.timeIndex() > runTime.startTimeIndex() + 1
) )
{ {
rDeltaT = rDeltaT0*max(rDeltaT/rDeltaT0, 1.0 - rDeltaTDampingCoeff); rDeltaT =
rDeltaT0
*max(rDeltaT/rDeltaT0, scalar(1.0) - rDeltaTDampingCoeff);
Info<< "Damped flow time scale min/max = " Info<< "Damped flow time scale min/max = "
<< gMin(1/rDeltaT.internalField()) << gMin(1/rDeltaT.internalField())
......
...@@ -49,7 +49,10 @@ Foam::label Foam::PatchInjection<CloudType>::parcelsToInject ...@@ -49,7 +49,10 @@ Foam::label Foam::PatchInjection<CloudType>::parcelsToInject
if if
( (
nParcelsToInject > 0 nParcelsToInject > 0
&& (nParcels - scalar(nParcelsToInject) > rnd.position(0.0, 1.0)) && (
nParcels - scalar(nParcelsToInject)
> rnd.position(scalar(0), scalar(1))
)
) )
{ {
++nParcelsToInject; ++nParcelsToInject;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment