Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev

Conflicts:
	applications/solvers/lagrangian/reactingParcelFilmPyrolysisFoam/Make/options
This commit is contained in:
sergio 2011-06-06 17:48:22 +01:00
commit e2d55d863f
25 changed files with 104 additions and 70 deletions

View File

@ -88,7 +88,7 @@
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("gh", g & mesh.Cf());
surfaceScalarField ghf("ghf", g & mesh.Cf());
volScalarField p_rgh
(

View File

@ -1,7 +1,7 @@
rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf(rAU.name(), fvc::interpolate(rho*rAU));
surfaceScalarField rhorAUf(rAU.name() + 'f', fvc::interpolate(rho*rAU));
U = rAU*UEqn.H();
surfaceScalarField phiU

View File

@ -18,6 +18,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/regionModels/pyrolysisModels/lnInclude \

View File

@ -13,14 +13,14 @@ tmp<fv::convectionScheme<scalar> > mvConvection
combustion->correct();
dQ = combustion->dQ();
label inertIndex = -1;
volScalarField Yt = 0.0*Y[0];
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{
if (Y[i].name() != inertSpecie)
{
volScalarField& Yi = Y[i];
fvScalarMatrix R = combustion->R(Yi);
fvScalarMatrix R(combustion->R(Yi));
fvScalarMatrix YiEqn
(
@ -66,7 +66,5 @@ tmp<fv::convectionScheme<scalar> > mvConvection
thermo.correct();
//radiation->correct();
Info<< "min/max(T) = " << min(T).value() << ", " << max(T).value() << endl;
}

View File

@ -110,7 +110,7 @@
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("gh", g & mesh.Cf());
surfaceScalarField ghf("ghf", g & mesh.Cf());
volScalarField p_rgh
(

View File

@ -1,7 +1,7 @@
rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf(rAU.name(), fvc::interpolate(rho*rAU));
surfaceScalarField rhorAUf(rAU.name() + 'f', fvc::interpolate(rho*rAU));
U = rAU*UEqn.H();
surfaceScalarField phiU

View File

@ -62,7 +62,6 @@ EXE_LIBS = \
-lsurfaceFilmModels \
-lsurfMesh \
-lsystemCall \
-ltabulatedWallFunctions \
-lthermalPorousZone \
-lthermophysicalFunctions \
-ltopoChangerFvMesh \

View File

@ -229,7 +229,8 @@ else
echo "created temporary '$caseFile'"
}
paraview --data="$caseFile" "$@"
# For now filter out any ld.so errors. Caused by non-system compiler?
paraview --data="$caseFile" "$@" 2>&1 | fgrep -v 'Inconsistency detected by ld.so'
fi

View File

@ -36,7 +36,7 @@
application: $(FOAM_TARGETS)
$(FOAM_TARGETS):
@(cd $@ && $(FOAM_APP))
+@(cd $@ && $(FOAM_APP))
#------------------------------------------------------------------------------

View File

@ -62,13 +62,13 @@ runParallel()
shift
echo "Running $APP_RUN in parallel on $PWD using $nProcs processes"
if [ "$WM_SCHEDULER" ]
then
echo "$PWD: $WM_SCHEDULER -np $nProcs" 1>&2
$WM_SCHEDULER -np $nProcs "( mpirun -np $nProcs $APP_RUN -parallel $* < /dev/null > log.$APP_NAME 2>&1 )"
else
#if [ "$WM_SCHEDULER" ]
#then
# echo "$PWD: $WM_SCHEDULER -np $nProcs" 1>&2
# $WM_SCHEDULER -np $nProcs "( mpirun -np $nProcs $APP_RUN -parallel $* < /dev/null > log.$APP_NAME 2>&1 )"
#else
( mpirun -np $nProcs $APP_RUN -parallel $* < /dev/null > log.$APP_NAME 2>&1 )
fi
#fi
fi
}

View File

@ -109,11 +109,13 @@ Foam::combustionModels::infinitelyFastChemistry::R(volScalarField& Y) const
const label fNorm = singleMixture_.specieProd()[specieI];
const volScalarField fres = singleMixture_.fres(specieI);
const volScalarField fres(singleMixture_.fres(specieI));
const volScalarField wSpecie =
const volScalarField wSpecie
(
wFuelNorm_*singleMixture_.specieStoichCoeffs()[specieI]
/ max(fNorm*(Y - fres), scalar(0.001));
/ max(fNorm*(Y - fres), scalar(0.001))
);
return -fNorm*wSpecie*fres + fNorm*fvm::Sp(wSpecie, Y);
}

View File

@ -134,9 +134,9 @@ void Foam::directMappedFlowRateFvPatchVectorField::updateCoeffs()
const surfaceScalarField& phiName =
db().lookupObject<surfaceScalarField>(phiName_);
scalarField U = -phi/patch().magSf();
scalarField U(-phi/patch().magSf());
vectorField n = patch().nf();
vectorField n(patch().nf());
if (phiName.dimensions() == dimVelocity*dimArea)
{

View File

@ -130,7 +130,6 @@ Foam::ThermoCloud<CloudType>::ThermoCloud
dimensionedScalar("zero", dimEnergy/dimTemperature, 0.0)
)
)
{
if (this->solution().active())
{

View File

@ -167,7 +167,7 @@ public:
// Private data
//- Local copy of carrier specific heat field
// Cp not stored on acrrier thermo, but returned as tmp<...>
// Cp not stored on carrier thermo, but returned as tmp<...>
const volScalarField Cp_;

View File

@ -205,6 +205,9 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td)
tetPtI
);
// Check/set new parcel thermo properties
td.cloud().setParcelThermoProperties(*pPtr, 0.0);
setParcelProperties(*pPtr, j);
// Check new parcel properties

View File

@ -345,7 +345,7 @@ void Foam::SprayCloud<CloudType>::motion(TrackData& td)
parcelType& p = iter();
if (p.mass() < VSMALL)
{
deleteParticle(p);
this->deleteParticle(p);
}
}
}

View File

@ -648,7 +648,7 @@ Foam::scalarField Foam::autoSnapDriver::calcSnapDistance
-GREAT // null value
);
return snapParams.snapTol()*maxEdgeLen;
return scalarField(snapParams.snapTol()*maxEdgeLen);
}

View File

@ -773,7 +773,7 @@ void Foam::autoSnapDriver::determineAllFeatures
labelList nearPointFeat;
labelList nearPointIndex;
{
scalarField snapDistSqr = sqr(snapDist);
scalarField snapDistSqr(sqr(snapDist));
features.findNearestEdge
(
pp.localPoints(),

View File

@ -133,8 +133,8 @@ void reactingOneDim::updatePhiGas()
const volScalarField& HsiGas = tHsiGas();
const volScalarField& RRiGas = tRRiGas();
const surfaceScalarField HsiGasf = fvc::interpolate(HsiGas);
const surfaceScalarField RRiGasf = fvc::interpolate(RRiGas);
const surfaceScalarField HsiGasf(fvc::interpolate(HsiGas));
const surfaceScalarField RRiGasf(fvc::interpolate(RRiGas));
forAll(intCoupledPatchIDs_, i)
{
@ -185,7 +185,7 @@ void reactingOneDim::updateMesh(const scalarField& mass0)
return;
}
const scalarField newV = mass0/rho_;
const scalarField newV(mass0/rho_);
Info<< "Initial/final volumes = " << gSum(regionMesh().V()) << ", "
<< gSum(newV) << " [m3]" << endl;
@ -227,7 +227,7 @@ void reactingOneDim::solveSpeciesMass()
Info<< "reactingOneDim::solveSpeciesMass()" << endl;
}
volScalarField Yt = 0.0*Ys_[0];
volScalarField Yt(0.0*Ys_[0]);
for (label i=0; i<Ys_.size()-1; i++)
{
@ -242,8 +242,10 @@ void reactingOneDim::solveSpeciesMass()
if (moveMesh_)
{
surfaceScalarField phiRhoMesh =
fvc::interpolate(Yi*rho_)*regionMesh().phi();
surfaceScalarField phiRhoMesh
(
fvc::interpolate(Yi*rho_)*regionMesh().phi()
);
YiEqn -= fvc::div(phiRhoMesh);
}
@ -264,11 +266,11 @@ void reactingOneDim::solveEnergy()
Info<< "reactingOneDim::solveEnergy()" << endl;
}
const volScalarField rhoCp = rho_*solidThermo_.Cp();
const volScalarField rhoCp(rho_*solidThermo_.Cp());
const surfaceScalarField phiQr = fvc::interpolate(Qr_)*nMagSf();
const surfaceScalarField phiQr(fvc::interpolate(Qr_)*nMagSf());
const surfaceScalarField phiGas = fvc::interpolate(phiHsGas_);
const surfaceScalarField phiGas(fvc::interpolate(phiHsGas_));
fvScalarMatrix TEqn
(
@ -282,8 +284,10 @@ void reactingOneDim::solveEnergy()
if (moveMesh_)
{
surfaceScalarField phiMesh =
fvc::interpolate(rhoCp*T_)*regionMesh().phi();
surfaceScalarField phiMesh
(
fvc::interpolate(rhoCp*T_)*regionMesh().phi()
);
TEqn -= fvc::div(phiMesh);
}
@ -456,10 +460,12 @@ scalar reactingOneDim::solidRegionDiffNo() const
scalar meanDiNum = 0.0;
if (regionMesh().nInternalFaces() > 0)
{
surfaceScalarField KrhoCpbyDelta =
surfaceScalarField KrhoCpbyDelta
(
regionMesh().surfaceInterpolation::deltaCoeffs()
* fvc::interpolate(K_)
/ fvc::interpolate(Cp()*rho_);
/ fvc::interpolate(Cp()*rho_)
);
DiNum = max(KrhoCpbyDelta.internalField())*time_.deltaTValue();

View File

@ -199,7 +199,7 @@ void Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs()
<< exit(FatalError);
}
const scalarField UAvePyr = -phiPyr/patch().magSf();
const scalarField UAvePyr(-phiPyr/patch().magSf());
const vectorField& nf = patch().nf();
forAll(deltaFilm, i)

View File

@ -76,7 +76,7 @@ void Foam::csvSetWriter<Type>::write
columns[i] = valueSets[i];
}
writeTable(points, columns, os);
this->writeTable(points, columns, os);
}
@ -110,7 +110,7 @@ void Foam::csvSetWriter<Type>::write
columns[i] = &valueSets[i][trackI];
}
writeTable(points[trackI], columns, os);
this->writeTable(points[trackI], columns, os);
os << nl << nl;
}
}

View File

@ -230,7 +230,7 @@ void temperatureThermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
const scalarField Cpw(model.thermo().Cp(Ti, patchI));
scalarField myh = patch().deltaCoeffs()*alphaw*Cpw;
scalarField myh(patch().deltaCoeffs()*alphaw*Cpw);
scalarField alphawCp(alphaw*Cpw);
@ -265,15 +265,16 @@ void temperatureThermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
scalarField nbrTi(nbrField.patchInternalField());
mpp.map().distribute(nbrTi);
const scalarField nbrCpw = model.thermo().Cp
const scalarField nbrCpw
(
nbrField.patchInternalField(),
nbrPatchI
model.thermo().Cp(nbrField.patchInternalField(), nbrPatchI)
);
scalarField nbrh =
scalarField nbrh
(
nbrPatch.deltaCoeffs()*nbrCpw
*model.alphaEff()().boundaryField()[nbrPatchI];
*model.alphaEff()().boundaryField()[nbrPatchI]
);
mpp.map().distribute(nbrh);
@ -290,8 +291,11 @@ void temperatureThermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
KDeltaw[i] = solid_().K((Tp[i] + nbrTp[i])/2.0)/thickness_[i];
}
const scalarField q =
(Ti() - nbrTi)/(1.0/KDeltaw + 1.0/nbrh + 1.0/myh);
const scalarField q
(
(Ti() - nbrTi)/(1.0/KDeltaw + 1.0/nbrh + 1.0/myh)
);
forAll(qDot, i)
{

View File

@ -26,7 +26,7 @@ boundaryField
type MarshakRadiation;
T T;
emissivityMode lookup;
emissivity 1;
emissivity uniform 1;
value uniform 0;
refValue uniform 0;
refGradient uniform 0;
@ -37,7 +37,7 @@ boundaryField
type MarshakRadiation;
T T;
emissivityMode lookup;
emissivity 1;
emissivity uniform 1;
value uniform 0;
refValue uniform 0;
refGradient uniform 0;

View File

@ -21,6 +21,27 @@ nz=2
tmpSetSet='patchify.setSet'
rm -f patchify.setSet >/dev/null 2>&1
initialiseFaceSet()
{
echo "faceSet cubeFaces clear" >> $tmpSetSet;
}
addToFaceSet()
{
name=$1
x1=$2
x2=$3
y1=$4
y2=$5
z1=$6
z2=$7
echo "faceSet cubeFaces add boxToFace ($x1 $y1 $z1) ($x2 $y2 $z2)" >> $tmpSetSet
echo " $name: (x1=$x1 y1=$y1 z1=$z1) (x2=$x2 y2=$y2 z2=$z2)"
}
createSetsAndZone()
{
@ -32,13 +53,12 @@ createSetsAndZone()
z1=$6
z2=$7
echo "faceSet ${name} new boxToFace ($x1 $y1 $z1) ($x2 $y2 $z2)" >> $tmpSetSet
echo "cellSet ${name}Cells new faceToCell ${name} owner" >> $tmpSetSet
echo "faceZoneSet ${name} new setsToFaceZone ${name} ${name}Cells" >> $tmpSetSet
echo "faceSet ${name}Faces new boxToFace ($x1 $y1 $z1) ($x2 $y2 $z2)" >> $tmpSetSet
echo " $name: (x1=$x1 y1=$y1 z1=$z1) (x2=$x2 y2=$y2 z2=$z2)"
}
initialiseFaceSet
# loop over cubes
n=1
@ -63,7 +83,7 @@ for xi in $(seq 1 1 $nx); do
y2=`echo $y $l $tol | awk '{print $1 + $2 + $3}'`
z1=`echo $z $l $tol | awk '{print $1 + $2 - $3}'`
z2=`echo $z $l $tol | awk '{print $1 + $2 + $3}'`
createSetsAndZone cube${pad}${n}_side${side} $x1 $x2 $y1 $y2 $z1 $z2
addToFaceSet cube${pad}${n}_side${side} $x1 $x2 $y1 $y2 $z1 $z2
# side 2
side=2
@ -73,7 +93,7 @@ for xi in $(seq 1 1 $nx); do
y2=`echo $y $l $tol | awk '{print $1 + $2 + $3}'`
z1=`echo $z $tol | awk '{print $1 - $2}'`
z2=`echo $z $l $tol | awk '{print $1 + $2 + $3}'`
createSetsAndZone cube${pad}${n}_side${side} $x1 $x2 $y1 $y2 $z1 $z2
addToFaceSet cube${pad}${n}_side${side} $x1 $x2 $y1 $y2 $z1 $z2
# side 3
side=3
@ -83,7 +103,7 @@ for xi in $(seq 1 1 $nx); do
y2=`echo $y $l $tol | awk '{print $1 + $2 + $3}'`
z1=`echo $z $tol | awk '{print $1 - $2}'`
z2=`echo $z $tol | awk '{print $1 + $2}'`
createSetsAndZone cube${pad}${n}_side${side} $x1 $x2 $y1 $y2 $z1 $z2
addToFaceSet cube${pad}${n}_side${side} $x1 $x2 $y1 $y2 $z1 $z2
# side 4
side=4
@ -93,7 +113,7 @@ for xi in $(seq 1 1 $nx); do
y2=`echo $y $l $tol | awk '{print $1 + $2 + $3}'`
z1=`echo $z $tol | awk '{print $1 - $2}'`
z2=`echo $z $l $tol | awk '{print $1 + $2 + $3}'`
createSetsAndZone cube${pad}${n}_side${side} $x1 $x2 $y1 $y2 $z1 $z2
addToFaceSet cube${pad}${n}_side${side} $x1 $x2 $y1 $y2 $z1 $z2
# side 5
side=5
@ -103,7 +123,7 @@ for xi in $(seq 1 1 $nx); do
y2=`echo $y $l $tol | awk '{print $1 + $2 + $3}'`
z1=`echo $z $tol | awk '{print $1 - $2}'`
z2=`echo $z $l $tol | awk '{print $1 + $2 + $3}'`
createSetsAndZone cube${pad}${n}_side${side} $x1 $x2 $y1 $y2 $z1 $z2
addToFaceSet cube${pad}${n}_side${side} $x1 $x2 $y1 $y2 $z1 $z2
# side 6
side=6
@ -113,7 +133,7 @@ for xi in $(seq 1 1 $nx); do
y2=`echo $y $tol | awk '{print $1 + $2}'`
z1=`echo $z $tol | awk '{print $1 - $2}'`
z2=`echo $z $l $tol | awk '{print $1 + $2 + $3}'`
createSetsAndZone cube${pad}${n}_side${side} $x1 $x2 $y1 $y2 $z1 $z2
addToFaceSet cube${pad}${n}_side${side} $x1 $x2 $y1 $y2 $z1 $z2
let n+=1
@ -126,12 +146,16 @@ for xi in $(seq 1 1 $nx); do
x=`echo $x $offset | awk '{print $1 + $2}'`
done
echo "cellSet cubeFacesCells new faceToCell cubeFaces owner" >> $tmpSetSet
echo "faceZoneSet cubeFaces new setsToFaceZone cubeFaces cubeFacesCells" >> $tmpSetSet
echo "processing floor"
floorMax=`echo 1 $tol | awk '{print $1 + $2}'`
createSetsAndZone floor -$tol $floorMax -$tol $floorMax -$tol $tol
echo "cellSet floorCells new faceToCell floorFaces owner" >> $tmpSetSet
echo "faceZoneSet floorFaces new setsToFaceZone floorFaces floorCells" >> $tmpSetSet
setSet -batch $tmpSetSet >> log.setSet.patchifyObstacles
rm -f $tmpSetSet
setSet -batch $tmpSetSet > log.setSet.patchifyObstacles >/dev/null 2>&1
# *************************************************************************

View File

@ -18,11 +18,8 @@ region wallFilmRegion;
faceZones
(
cube01_side1 cube01_side2 cube01_side3 cube01_side4 cube01_side5 cube01_side6
cube02_side1 cube02_side2 cube02_side3 cube02_side4 cube02_side5 cube02_side6
cube03_side1 cube03_side2 cube03_side3 cube03_side4 cube03_side5 cube03_side6
cube04_side1 cube04_side2 cube04_side3 cube04_side4 cube04_side5 cube04_side6
floor
cubeFaces
floorFaces
);
oneD false;