mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
multiphaseEulerFoam.C
|
||||
multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/multiphaseEulerFoam
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
EXE_INC = \
|
||||
-IphaseModel/lnInclude \
|
||||
-ImultiphaseSystem/lnInclude \
|
||||
-ImultiphaseFixedFluxPressure \
|
||||
/*-IkineticTheoryModels/lnInclude*/ \
|
||||
-IinterfacialModels/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
|
||||
@ -1,2 +1,8 @@
|
||||
MRFZones mrfZones(mesh);
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
{
|
||||
mrfZones.correctBoundaryVelocity(iter().U());
|
||||
}
|
||||
|
||||
mrfZones.correctBoundaryVelocity(U);
|
||||
|
||||
@ -53,12 +53,12 @@
|
||||
|
||||
phase.U() = rAUs[phasei]*UEqns[phasei].H();
|
||||
|
||||
mrfZones.absoluteFlux(phase.phi());
|
||||
phase.phi() =
|
||||
(
|
||||
(fvc::interpolate(phase.U()) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAUs[phasei], alpha, phase.U(), phase.phi())
|
||||
);
|
||||
|
||||
mrfZones.relativeFlux(phase.phi());
|
||||
phase.phi() += rAlphaAUfs[phasei]*(g & mesh.Sf());
|
||||
|
||||
@ -241,7 +241,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
phase.U() = fvc::reconstruct(phase.phi());
|
||||
phase.U().correctBoundaryConditions();
|
||||
|
||||
U += alpha*phase.U();
|
||||
|
||||
@ -486,6 +486,14 @@ case QSMPI:
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
breaksw
|
||||
|
||||
case SGIMPI:
|
||||
setenv FOAM_MPI ${MPI_ROOT##*/}
|
||||
setenv MPI_ARCH_PATH $MPI_ROOT
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
breaksw
|
||||
|
||||
default:
|
||||
setenv FOAM_MPI dummy
|
||||
breaksw
|
||||
|
||||
@ -510,6 +510,14 @@ QSMPI)
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
;;
|
||||
|
||||
SGIMPI)
|
||||
export FOAM_MPI=${MPI_ROOT##*/}
|
||||
export MPI_ARCH_PATH=$MPI_ROOT
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
;;
|
||||
|
||||
*)
|
||||
export FOAM_MPI=dummy
|
||||
;;
|
||||
|
||||
@ -127,7 +127,6 @@ $(derivedFvPatchFields)/fan/fanFvPatchFields.C
|
||||
$(derivedFvPatchFields)/fanPressure/fanPressureFvPatchScalarField.C
|
||||
$(derivedFvPatchFields)/buoyantPressure/buoyantPressureFvPatchScalarField.C
|
||||
$(derivedFvPatchFields)/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C
|
||||
$(derivedFvPatchFields)/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C
|
||||
$(derivedFvPatchFields)/fixedInternalValueFvPatchField/fixedInternalValueFvPatchFields.C
|
||||
$(derivedFvPatchFields)/fixedNormalSlip/fixedNormalSlipFvPatchFields.C
|
||||
$(derivedFvPatchFields)/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.C
|
||||
|
||||
@ -76,7 +76,8 @@ void Foam::solutionControl::read(const bool absTolOnly)
|
||||
{
|
||||
FatalErrorIn("bool Foam::solutionControl::read()")
|
||||
<< "Residual data for " << iter().keyword()
|
||||
<< " must be specified as a dictionary";
|
||||
<< " must be specified as a dictionary"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,177 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "multiphaseFixedFluxPressureFvPatchScalarField.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField::
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(p, iF),
|
||||
UName_("U"),
|
||||
phiName_("phi"),
|
||||
rhoName_("rho")
|
||||
{}
|
||||
|
||||
|
||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField::
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const multiphaseFixedFluxPressureFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(ptf, p, iF, mapper),
|
||||
UName_(ptf.UName_),
|
||||
phiName_(ptf.phiName_),
|
||||
rhoName_(ptf.rhoName_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField::
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(p, iF),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho"))
|
||||
{
|
||||
if (dict.found("gradient"))
|
||||
{
|
||||
gradient() = scalarField("gradient", dict, p.size());
|
||||
fixedGradientFvPatchScalarField::updateCoeffs();
|
||||
fixedGradientFvPatchScalarField::evaluate();
|
||||
}
|
||||
else
|
||||
{
|
||||
fvPatchField<scalar>::operator=(patchInternalField());
|
||||
gradient() = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField::
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const multiphaseFixedFluxPressureFvPatchScalarField& wbppsf
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(wbppsf),
|
||||
UName_(wbppsf.UName_),
|
||||
phiName_(wbppsf.phiName_),
|
||||
rhoName_(wbppsf.rhoName_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField::
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const multiphaseFixedFluxPressureFvPatchScalarField& wbppsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(wbppsf, iF),
|
||||
UName_(wbppsf.UName_),
|
||||
phiName_(wbppsf.phiName_),
|
||||
rhoName_(wbppsf.rhoName_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::multiphaseFixedFluxPressureFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const fvPatchField<vector>& Up =
|
||||
patch().lookupPatchField<volVectorField, vector>(UName_);
|
||||
|
||||
const surfaceScalarField& phi =
|
||||
db().lookupObject<surfaceScalarField>(phiName_);
|
||||
|
||||
fvsPatchField<scalar> phip =
|
||||
patch().patchField<surfaceScalarField, scalar>(phi);
|
||||
|
||||
if (phi.dimensions() == dimDensity*dimVelocity*dimArea)
|
||||
{
|
||||
const fvPatchField<scalar>& rhop =
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
|
||||
phip /= rhop;
|
||||
}
|
||||
|
||||
const fvsPatchField<scalar>& Dpp =
|
||||
patch().lookupPatchField<surfaceScalarField, scalar>("Dp");
|
||||
|
||||
gradient() = (phip - (patch().Sf() & Up))/patch().magSf()/Dpp;
|
||||
|
||||
fixedGradientFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::multiphaseFixedFluxPressureFvPatchScalarField::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
fvPatchScalarField::write(os);
|
||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||
gradient().writeEntry("gradient", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,154 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField
|
||||
|
||||
Description
|
||||
Foam::multiphaseFixedFluxPressureFvPatchScalarField
|
||||
|
||||
SourceFiles
|
||||
multiphaseFixedFluxPressureFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef multiphaseFixedFluxPressureFvPatchScalarFields_H
|
||||
#define multiphaseFixedFluxPressureFvPatchScalarFields_H
|
||||
|
||||
#include "fvPatchFields.H"
|
||||
#include "fixedGradientFvPatchFields.H"
|
||||
#include "Switch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class multiphaseFixedFluxPressureFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class multiphaseFixedFluxPressureFvPatchScalarField
|
||||
:
|
||||
public fixedGradientFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name of the velocity field
|
||||
word UName_;
|
||||
|
||||
//- Name of the flux transporting the field
|
||||
word phiName_;
|
||||
|
||||
//- Name of the density field used to normalise the mass flux
|
||||
// if neccessary
|
||||
word rhoName_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("multiphaseFixedFluxPressure");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// multiphaseFixedFluxPressureFvPatchScalarField onto a new patch
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const multiphaseFixedFluxPressureFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const multiphaseFixedFluxPressureFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchScalarField> clone() const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new multiphaseFixedFluxPressureFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
multiphaseFixedFluxPressureFvPatchScalarField
|
||||
(
|
||||
const multiphaseFixedFluxPressureFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new multiphaseFixedFluxPressureFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -190,6 +190,7 @@ Foam::forces::forces
|
||||
rhoRef_(VGREAT),
|
||||
pRef_(0),
|
||||
coordSys_(),
|
||||
localSystem_(false),
|
||||
forcesFilePtr_(NULL)
|
||||
{
|
||||
// Check if the available mesh is an fvMesh otherise deactivate
|
||||
@ -239,6 +240,7 @@ Foam::forces::forces
|
||||
rhoRef_(rhoInf),
|
||||
pRef_(pRef),
|
||||
coordSys_(coordSys),
|
||||
localSystem_(false),
|
||||
forcesFilePtr_(NULL)
|
||||
{}
|
||||
|
||||
@ -330,6 +332,7 @@ void Foam::forces::read(const dictionary& dict)
|
||||
if (!dict.readIfPresent<point>("CofR", coordSys_.origin()))
|
||||
{
|
||||
coordSys_ = coordinateSystem(dict, obr_);
|
||||
localSystem_ = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -382,10 +385,17 @@ void Foam::forces::writeFileHeader()
|
||||
{
|
||||
forcesFilePtr_()
|
||||
<< "# Time" << tab
|
||||
<< "forces(pressure, viscous) moment(pressure, viscous)"
|
||||
<< "forces(pressure, viscous) moment(pressure, viscous)";
|
||||
|
||||
if (localSystem_)
|
||||
{
|
||||
forcesFilePtr_()
|
||||
<< tab
|
||||
<< "local forces(pressure, viscous) local moment(pressure, viscous)"
|
||||
<< endl;
|
||||
<< "local forces(pressure, viscous) "
|
||||
<< "local moment(pressure, viscous)";
|
||||
}
|
||||
|
||||
forcesFilePtr_()<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -412,6 +422,16 @@ void Foam::forces::write()
|
||||
forcesMoments fm = calcForcesMoment();
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
if (log_)
|
||||
{
|
||||
Info<< "forces output:" << nl
|
||||
<< " forces(pressure, viscous)" << fm.first() << nl
|
||||
<< " moment(pressure, viscous)" << fm.second() << nl;
|
||||
|
||||
forcesFilePtr_() << obr_.time().value() << tab << fm;
|
||||
|
||||
if (localSystem_)
|
||||
{
|
||||
forcesMoments fmLocal;
|
||||
|
||||
@ -427,19 +447,18 @@ void Foam::forces::write()
|
||||
fmLocal.second().second() =
|
||||
coordSys_.localVector(fm.second().second());
|
||||
|
||||
forcesFilePtr_() << obr_.time().value()
|
||||
<< tab << fm
|
||||
<< tab << fmLocal << endl;
|
||||
forcesFilePtr_() << tab << fmLocal;
|
||||
|
||||
if (log_)
|
||||
{
|
||||
Info<< "forces output:" << nl
|
||||
<< " forces(pressure, viscous)" << fm.first() << nl
|
||||
<< " moment(pressure, viscous)" << fm.second() << nl
|
||||
<< " local:" << nl
|
||||
<< " forces(pressure, viscous)" << fmLocal.first() << nl
|
||||
<< " moment(pressure, viscous)" << fmLocal.second() << nl
|
||||
<< endl;
|
||||
|
||||
Info<< " local:" << nl
|
||||
<< " forces(pressure, viscous)" << fmLocal.first()
|
||||
<< nl
|
||||
<< " moment(pressure, viscous)" << fmLocal.second()
|
||||
<< nl;
|
||||
}
|
||||
|
||||
forcesFilePtr_() << endl;
|
||||
Info<< endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,6 +165,9 @@ protected:
|
||||
//- Coordinate system used when evaluting forces/moments
|
||||
coordinateSystem coordSys_;
|
||||
|
||||
//- Flag to indicate whether we are using a local co-ordinate sys
|
||||
bool localSystem_;
|
||||
|
||||
|
||||
//- Forces/moment file ptr
|
||||
autoPtr<OFstream> forcesFilePtr_;
|
||||
|
||||
@ -97,18 +97,12 @@ PIMPLE
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
}
|
||||
equations
|
||||
{
|
||||
"U.*" 1;
|
||||
"T.*" 1;
|
||||
"alpha.*" 1;
|
||||
"Theta.*" 1;
|
||||
"k.*" 1;
|
||||
"epsilon.*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -88,13 +88,7 @@ PIMPLE
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
}
|
||||
equations
|
||||
{
|
||||
"U.*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
3
wmake/rules/General/mplibSGIMPI
Normal file
3
wmake/rules/General/mplibSGIMPI
Normal file
@ -0,0 +1,3 @@
|
||||
PFLAGS = -DSGIMPI -DMPI_NO_CPPBIND
|
||||
PINC = -I$(MPI_ARCH_PATH)/include
|
||||
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi
|
||||
Reference in New Issue
Block a user