Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2011-01-26 17:00:04 +00:00
24 changed files with 451 additions and 346 deletions

View File

@ -74,7 +74,7 @@ Foam::KinematicCloud<ParcelType>::cloudSolution::cloudSolution
coupled_(false),
cellValueSourceCorrection_(false),
maxTrackTime_(0.0),
resetSourcesOnStartup_(false)
resetSourcesOnStartup_(true)
{
if (active_)
{
@ -188,6 +188,84 @@ bool Foam::KinematicCloud<ParcelType>::cloudSolution::output() const
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
template<class ParcelType>
void Foam::KinematicCloud<ParcelType>::setModels()
{
collisionModel_.reset
(
CollisionModel<KinematicCloud<ParcelType> >::New
(
subModelProperties_,
*this
).ptr()
);
dispersionModel_.reset
(
DispersionModel<KinematicCloud<ParcelType> >::New
(
subModelProperties_,
*this
).ptr()
);
dragModel_.reset
(
DragModel<KinematicCloud<ParcelType> >::New
(
subModelProperties_,
*this
).ptr()
);
injectionModel_.reset
(
InjectionModel<KinematicCloud<ParcelType> >::New
(
subModelProperties_,
*this
).ptr()
);
patchInteractionModel_.reset
(
PatchInteractionModel<KinematicCloud<ParcelType> >::New
(
subModelProperties_,
*this
).ptr()
);
postProcessingModel_.reset
(
PostProcessingModel<KinematicCloud<ParcelType> >::New
(
subModelProperties_,
*this
).ptr()
);
surfaceFilmModel_.reset
(
SurfaceFilmModel<KinematicCloud<ParcelType> >::New
(
subModelProperties_,
*this,
g_
).ptr()
);
UIntegrator_.reset
(
vectorIntegrationScheme::New
(
"U",
solution_.integrationSchemes()
).ptr()
);
}
template<class ParcelType>
void Foam::KinematicCloud<ParcelType>::solve
(
@ -450,8 +528,8 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
)
),
solution_(mesh_, particleProperties_.subDict("solution")),
constProps_(particleProperties_),
subModelProperties_(particleProperties_.subDict("subModels")),
constProps_(particleProperties_, solution_.active()),
subModelProperties_(particleProperties_.subOrEmptyDict("subModels")),
rndGen_
(
label(0),
@ -462,72 +540,15 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
U_(U),
mu_(mu),
g_(g),
forces_(mesh_, particleProperties_, g_.value()),
collisionModel_
(
CollisionModel<KinematicCloud<ParcelType> >::New
(
subModelProperties_,
*this
)
),
dispersionModel_
(
DispersionModel<KinematicCloud<ParcelType> >::New
(
subModelProperties_,
*this
)
),
dragModel_
(
DragModel<KinematicCloud<ParcelType> >::New
(
subModelProperties_,
*this
)
),
injectionModel_
(
InjectionModel<KinematicCloud<ParcelType> >::New
(
subModelProperties_,
*this
)
),
patchInteractionModel_
(
PatchInteractionModel<KinematicCloud<ParcelType> >::New
(
subModelProperties_,
*this
)
),
postProcessingModel_
(
PostProcessingModel<KinematicCloud<ParcelType> >::New
(
subModelProperties_,
*this
)
),
surfaceFilmModel_
(
SurfaceFilmModel<KinematicCloud<ParcelType> >::New
(
subModelProperties_,
*this,
g
)
),
UIntegrator_
(
vectorIntegrationScheme::New
(
"U",
solution_.integrationSchemes()
)
),
forces_(mesh_, particleProperties_, g_.value(), solution_.active()),
collisionModel_(NULL),
dispersionModel_(NULL),
dragModel_(NULL),
injectionModel_(NULL),
patchInteractionModel_(NULL),
postProcessingModel_(NULL),
surfaceFilmModel_(NULL),
UIntegrator_(NULL),
UTrans_
(
new DimensionedField<vector, volMesh>
@ -561,6 +582,11 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
)
)
{
if (solution_.active())
{
setModels();
}
if (readFields)
{
ParcelType::readFields(*this);

View File

@ -364,6 +364,12 @@ protected:
autoPtr<DimensionedField<scalar, volMesh> > UCoeff_;
// Initialisation
//- Set cloud sub-models
void setModels();
// Cloud evolution functions
//- Solve the cloud - calls all evolution functions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,6 +30,29 @@ License
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
template<class ParcelType>
void Foam::ReactingCloud<ParcelType>::setModels()
{
compositionModel_.reset
(
CompositionModel<ReactingCloud<ParcelType> >::New
(
this->subModelProperties(),
*this
).ptr()
);
phaseChangeModel_.reset
(
PhaseChangeModel<ReactingCloud<ParcelType> >::New
(
this->subModelProperties(),
*this
).ptr()
);
}
template<class ParcelType>
void Foam::ReactingCloud<ParcelType>::checkSuppliedComposition
(
@ -85,26 +108,17 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
ThermoCloud<ParcelType>(cloudName, rho, U, g, thermo, false),
reactingCloud(),
cloudCopyPtr_(NULL),
constProps_(this->particleProperties()),
compositionModel_
(
CompositionModel<ReactingCloud<ParcelType> >::New
(
this->subModelProperties(),
*this
)
),
phaseChangeModel_
(
PhaseChangeModel<ReactingCloud<ParcelType> >::New
(
this->subModelProperties(),
*this
)
),
constProps_(this->particleProperties(), this->solution().active()),
compositionModel_(NULL),
phaseChangeModel_(NULL),
rhoTrans_(thermo.carrier().species().size()),
dMassPhaseChange_(0.0)
{
if (this->solution().active())
{
setModels();
}
// Set storage for mass source fields and initialise to zero
forAll(rhoTrans_, i)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -128,6 +128,12 @@ protected:
);
// Initialisation
//- Set cloud sub-models
void setModels();
// Cloud evolution functions
//- Reset state of cloud

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,6 +30,29 @@ License
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
template<class ParcelType>
void Foam::ReactingMultiphaseCloud<ParcelType>::setModels()
{
devolatilisationModel_.reset
(
DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> >::New
(
this->subModelProperties(),
*this
).ptr()
);
surfaceReactionModel_.reset
(
SurfaceReactionModel<ReactingMultiphaseCloud<ParcelType> >::New
(
this->subModelProperties(),
*this
).ptr()
);
}
template<class ParcelType>
void Foam::ReactingMultiphaseCloud<ParcelType>::cloudReset
(
@ -62,26 +85,17 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
ReactingCloud<ParcelType>(cloudName, rho, U, g, thermo, false),
reactingMultiphaseCloud(),
cloudCopyPtr_(NULL),
constProps_(this->particleProperties()),
devolatilisationModel_
(
DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> >::New
(
this->subModelProperties(),
*this
)
),
surfaceReactionModel_
(
SurfaceReactionModel<ReactingMultiphaseCloud<ParcelType> >::New
(
this->subModelProperties(),
*this
)
),
constProps_(this->particleProperties(), this->solution().active()),
devolatilisationModel_(NULL),
surfaceReactionModel_(NULL),
dMassDevolatilisation_(0.0),
dMassSurfaceReaction_(0.0)
{
if (this->solution().active())
{
setModels();
}
if (readFields)
{
ParcelType::readFields(*this);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -119,6 +119,12 @@ protected:
// Protected Member Functions
// Initialisation
//- Set cloud sub-models
void setModels();
// Cloud evolution functions
//- Reset state of cloud

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,6 +30,31 @@ License
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
template<class ParcelType>
void Foam::ThermoCloud<ParcelType>::setModels()
{
heatTransferModel_.reset
(
HeatTransferModel<ThermoCloud<ParcelType> >::New
(
this->subModelProperties(),
*this
).ptr()
);
TIntegrator_.reset
(
scalarIntegrationScheme::New
(
"T",
this->solution().integrationSchemes()
).ptr()
);
this->subModelProperties().lookup("radiation") >> radiation_;
}
template<class ParcelType>
void Foam::ThermoCloud<ParcelType>::cloudReset(ThermoCloud<ParcelType>& c)
{
@ -66,27 +91,13 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
),
thermoCloud(),
cloudCopyPtr_(NULL),
constProps_(this->particleProperties()),
constProps_(this->particleProperties(), this->solution().active()),
thermo_(thermo),
T_(thermo.thermo().T()),
p_(thermo.thermo().p()),
heatTransferModel_
(
HeatTransferModel<ThermoCloud<ParcelType> >::New
(
this->subModelProperties(),
*this
)
),
TIntegrator_
(
scalarIntegrationScheme::New
(
"T",
this->solution().integrationSchemes()
)
),
radiation_(this->subModelProperties().lookup("radiation")),
heatTransferModel_(NULL),
TIntegrator_(NULL),
radiation_(false),
hsTrans_
(
new DimensionedField<scalar, volMesh>
@ -121,6 +132,11 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
)
{
if (this->solution().active())
{
setModels();
}
if (readFields)
{
ParcelType::readFields(*this);
@ -143,7 +159,7 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
KinematicCloud<ParcelType>(c, name),
thermoCloud(),
cloudCopyPtr_(NULL),
constProps_(c.particleProperties_),
constProps_(c.constProps_),
thermo_(c.thermo_),
T_(c.T()),
p_(c.p()),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -128,6 +128,12 @@ protected:
// Protected Member Functions
// Initialisation
//- Set cloud sub-models
void setModels();
// Cloud evolution functions
//- Reset state of cloud

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -98,22 +98,22 @@ public:
//- Parcel type id - used for post-processing to flag the type
// of parcels issued by this cloud
const label parcelTypeId_;
label parcelTypeId_;
//- Minimum density [kg/m3]
const scalar rhoMin_;
scalar rhoMin_;
//- Particle density [kg/m3] (constant)
const scalar rho0_;
scalar rho0_;
//- Minimum particle mass [kg]
const scalar minParticleMass_;
scalar minParticleMass_;
//- Young's modulus [N/m2]
const scalar youngsModulus_;
scalar youngsModulus_;
//- Poisson's ratio
const scalar poissonsRatio_;
scalar poissonsRatio_;
public:
@ -127,7 +127,11 @@ public:
constantProperties(const constantProperties& cp);
//- Constructor from dictionary
constantProperties(const dictionary& parentDict);
constantProperties
(
const dictionary& parentDict,
const bool readFields = true
);
// Member functions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,17 +62,28 @@ inline Foam::KinematicParcel<ParcelType>::constantProperties::constantProperties
template<class ParcelType>
inline Foam::KinematicParcel<ParcelType>::constantProperties::constantProperties
(
const dictionary& parentDict
const dictionary& parentDict,
const bool readFields
)
:
dict_(parentDict.subDict("constantProperties")),
parcelTypeId_(readLabel(dict_.lookup("parcelTypeId"))),
rhoMin_(readScalar(dict_.lookup("rhoMin"))),
rho0_(readScalar(dict_.lookup("rho0"))),
minParticleMass_(readScalar(dict_.lookup("minParticleMass"))),
youngsModulus_(readScalar(dict_.lookup("youngsModulus"))),
poissonsRatio_(readScalar(dict_.lookup("poissonsRatio")))
{}
dict_(parentDict.subOrEmptyDict("constantProperties")),
parcelTypeId_(-1),
rhoMin_(0.0),
rho0_(0.0),
minParticleMass_(0.0),
youngsModulus_(0.0),
poissonsRatio_(0.0)
{
if (readFields)
{
dict_.lookup("parcelTypeId") >> parcelTypeId_;
dict_.lookup("rhoMin") >> rhoMin_;
dict_.lookup("rho0") >> rho0_;
dict_.lookup("minParticleMass") >> minParticleMass_;
dict_.lookup("youngsModulus") >> youngsModulus_;
dict_.lookup("poissonsRatio") >> poissonsRatio_;
}
}
template<class ParcelType>

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -82,7 +82,7 @@ public:
// Private data
//- Latent heat of devolatilisation [J/kg]
const scalar LDevol_;
scalar LDevol_;
//- Fraction of enthalpy retained by parcel due to surface
// reactions
@ -100,7 +100,11 @@ public:
constantProperties(const constantProperties& cp);
//- Constructor from dictionary
constantProperties(const dictionary& parentDict);
constantProperties
(
const dictionary& parentDict,
const bool readFields = true
);
// Access

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -54,24 +54,31 @@ template<class ParcelType>
inline Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
constantProperties
(
const dictionary& parentDict
const dictionary& parentDict,
const bool readFields
)
:
ReactingParcel<ParcelType>::constantProperties(parentDict),
LDevol_(readScalar(this->dict().lookup("LDevol"))),
hRetentionCoeff_(readScalar(this->dict().lookup("hRetentionCoeff")))
ReactingParcel<ParcelType>::constantProperties(parentDict, readFields),
LDevol_(0.0),
hRetentionCoeff_(0.0)
{
if ((hRetentionCoeff_ < 0) || (hRetentionCoeff_ > 1))
if (readFields)
{
FatalErrorIn
(
"ReactingMultiphaseParcel<ParcelType>::constantProperties::"
"constantProperties"
) << "hRetentionCoeff must be in the range 0 to 1" << nl
<< exit(FatalError) << endl;
}
this->dict().lookup("LDevol") >> LDevol_;
this->dict().lookup("hRetentionCoeff") >> hRetentionCoeff_;
hRetentionCoeff_ = max(1e-06, hRetentionCoeff_);
if ((hRetentionCoeff_ < 0) || (hRetentionCoeff_ > 1))
{
FatalErrorIn
(
"ReactingMultiphaseParcel<ParcelType>::constantProperties::"
"constantProperties"
) << "hRetentionCoeff must be in the range 0 to 1" << nl
<< exit(FatalError) << endl;
}
hRetentionCoeff_ = max(1e-06, hRetentionCoeff_);
}
}

View File

@ -77,16 +77,16 @@ public:
// Private data
//- Minimum pressure [Pa]
const scalar pMin_;
scalar pMin_;
//- Constant volume flag - e.g. during mass transfer
Switch constantVolume_;
//- Vaporisation temperature [K]
const scalar Tvap_;
scalar Tvap_;
//- Boiling point [K]
const scalar Tbp_;
scalar Tbp_;
public:
@ -100,7 +100,11 @@ public:
constantProperties(const constantProperties& cp);
//- Constructor from dictionary
constantProperties(const dictionary& parentDict);
constantProperties
(
const dictionary& parentDict,
const bool readFields = true
);
// Access

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -54,15 +54,24 @@ inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
template<class ParcelType>
inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
(
const dictionary& parentDict
const dictionary& parentDict,
const bool readFields
)
:
ThermoParcel<ParcelType>::constantProperties(parentDict),
pMin_(readScalar(this->dict().lookup("pMin"))),
constantVolume_(this->dict().lookup("constantVolume")),
Tvap_(readScalar(this->dict().lookup("Tvap"))),
Tbp_(readScalar(this->dict().lookup("Tbp")))
{}
ThermoParcel<ParcelType>::constantProperties(parentDict, readFields),
pMin_(0.0),
constantVolume_(false),
Tvap_(0.0),
Tbp_(0.0)
{
if (readFields)
{
this->dict().lookup("pMin") >> pMin_;
this->dict().lookup("constantVolume") >> constantVolume_;
this->dict().lookup("Tvap") >> Tvap_;
this->dict().lookup("Tbp") >> Tbp_;
}
}
template<class ParcelType>

View File

@ -77,22 +77,22 @@ public:
// Private data
//- Particle initial temperature [K]
const scalar T0_;
scalar T0_;
//- Minimum temperature [K]
const scalar TMin_;
scalar TMin_;
//- Particle specific heat capacity [J/(kg.K)]
const scalar Cp0_;
scalar Cp0_;
//- Particle emissivity [] (radiation)
const scalar epsilon0_;
scalar epsilon0_;
//- Particle scattering factor [] (radiation)
const scalar f0_;
scalar f0_;
//- Default carrier Prandtl number []
const scalar Pr_;
scalar Pr_;
public:
@ -106,7 +106,11 @@ public:
constantProperties(const constantProperties& cp);
//- Constructor from dictionary
constantProperties(const dictionary& parentDict);
constantProperties
(
const dictionary& parentDict,
const bool readFields = true
);
// Member functions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,17 +57,28 @@ inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
template<class ParcelType>
inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
(
const dictionary& parentDict
const dictionary& parentDict,
const bool readFields
)
:
KinematicParcel<ParcelType>::constantProperties(parentDict),
T0_(readScalar(this->dict().lookup("T0"))),
TMin_(readScalar(this->dict().lookup("TMin"))),
Cp0_(readScalar(this->dict().lookup("Cp0"))),
epsilon0_(readScalar(this->dict().lookup("epsilon0"))),
f0_(readScalar(this->dict().lookup("f0"))),
Pr_(readScalar(this->dict().lookup("Pr")))
{}
KinematicParcel<ParcelType>::constantProperties(parentDict, readFields),
T0_(0.0),
TMin_(0.0),
Cp0_(0.0),
epsilon0_(0.0),
f0_(0.0),
Pr_(0.0)
{
if (readFields)
{
this->dict().lookup("T0") >> T0_;
this->dict().lookup("TMin") >> TMin_;
this->dict().lookup("Cp0") >> Cp0_;
this->dict().lookup("epsilon0") >> epsilon0_;
this->dict().lookup("f0") >> f0_;
this->dict().lookup("Pr") >> Pr_;
}
}
template<class ParcelType>

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -74,32 +74,41 @@ Foam::particleForces::particleForces
(
const fvMesh& mesh,
const dictionary& dict,
const vector& g
const vector& g,
const bool readFields
)
:
mesh_(mesh),
dict_(dict.subDict("particleForces")),
dict_(dict.subOrEmptyDict("particleForces")),
g_(g),
gradUPtr_(NULL),
HdotGradHInterPtr_(NULL),
gravity_(dict_.lookup("gravity")),
virtualMass_(dict_.lookup("virtualMass")),
gravity_(false),
virtualMass_(false),
Cvm_(0.0),
pressureGradient_(dict_.lookup("pressureGradient")),
paramagnetic_(dict_.lookup("paramagnetic")),
pressureGradient_(false),
paramagnetic_(false),
magneticSusceptibility_(0.0),
refFrame_(rfInertial),
UName_(dict_.lookupOrDefault<word>("UName", "U")),
HdotGradHName_(dict_.lookupOrDefault<word>("HdotGradHName", "HdotGradH"))
{
if (virtualMass_)
if (readFields)
{
dict_.lookup("Cvm") >> Cvm_;
}
dict_.lookup("gravity") >> gravity_;
dict_.lookup("virtualMass") >> virtualMass_;
dict_.lookup("pressureGradient") >> pressureGradient_;
dict_.lookup("paramagnetic") >> paramagnetic_;
if (paramagnetic_)
{
dict_.lookup("magneticSusceptibility") >> magneticSusceptibility_;
if (virtualMass_)
{
dict_.lookup("Cvm") >> Cvm_;
}
if (paramagnetic_)
{
dict_.lookup("magneticSusceptibility") >> magneticSusceptibility_;
}
}
if (dict_.found("referenceFrame"))
@ -116,9 +125,10 @@ Foam::particleForces::particleForces
(
"Foam::particleForces::particleForces"
"("
"const fvMesh& mesh,"
"const dictionary& dict,"
"const vector& g"
"const fvMesh&, "
"const dictionary&, "
"const vector&, "
"const bool"
")"
)
<< "Unknown referenceFrame, options are inertial and SRF."
@ -235,10 +245,8 @@ void Foam::particleForces::cacheFields
if (paramagnetic_)
{
const volVectorField& HdotGradH = mesh_.lookupObject<volVectorField>
(
HdotGradHName_
);
const volVectorField& HdotGradH =
mesh_.lookupObject<volVectorField>(HdotGradHName_);
HdotGradHInterPtr_ = interpolation<vector>::New
(
@ -329,7 +337,7 @@ Foam::vector Foam::particleForces::calcNonCoupled
// *magneticSusceptibility_/(magneticSusceptibility_ + 3)
// *HdotGradH[cellI];
// which is divided by mass ((4/3)*pi*r^3*rho) to produce
// which is divided by mass (pi*d^3*rho/6) to produce
// acceleration
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -134,7 +134,8 @@ public:
(
const fvMesh& mesh,
const dictionary& dict,
const vector& g
const vector& g,
const bool readFields = true
);
//- Construct copy

View File

@ -11,5 +11,5 @@ mv log.setSet log.wallFilmRegion.setSet
runApplication setsToZones -noFlipMap
mv log.setsToZones log.setsToZones.primaryRegion
runApplication extrudeToRegionMesh wallFilmRegion '(wallFilmFaces)' 0.01 -overwrite
runApplication extrudeToRegionMesh -overwrite

View File

@ -18,70 +18,6 @@ FoamFile
solution
{
active false;
integrationSchemes
{
U Euler;
T Analytical;
}
}
constantProperties
{
parcelTypeId 1;
rhoMin 1e-15;
TMin 200;
pMin 1000;
minParticleMass 1e-15;
rho0 1000;
T0 300;
Cp0 4187;
epsilon0 1;
f0 0.5;
Pr 0.7;
Tvap 273;
Tbp 373;
youngsModulus 0;
poissonsRatio 0;
constantVolume false;
}
particleForces
{
gravity on;
virtualMass off;
pressureGradient off;
paramagnetic off;
}
subModels
{
InjectionModel none;
DragModel none;
DispersionModel none;
PatchInteractionModel none;
CollisionModel none;
HeatTransferModel none;
CompositionModel none;
PhaseChangeModel none;
PostProcessingModel none;
SurfaceFilmModel none;
radiation off;
}

View File

@ -0,0 +1,38 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object extrudeToRegionMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
region wallFilmRegion;
faceZones (wallFilmFaces);
adaptMesh true;
oneD false;
extrudeModel linearNormal;
nLayers 1;
expansionRatio 1;
linearNormalCoeffs
{
thickness 0.01;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -6,7 +6,7 @@ runApplication blockMesh
runApplication setSet -batch wallFilmRegion.setSet
mv log.setSet log.wallFilmRegion.setSet
runApplication extrudeToRegionMesh wallFilmRegion '(wallFilmFaces)' 0.01 -overwrite
runApplication extrudeToRegionMesh -overwrite
runApplication setSet -region wallFilmRegion -batch createWallFilmRegionPatches.setSet
mv log.setSet log.createWallFilmRegionPatches.setSet

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
@ -18,70 +18,6 @@ FoamFile
solution
{
active false;
integrationSchemes
{
U Euler;
T Analytical;
}
}
constantProperties
{
parcelTypeId 1;
rhoMin 1e-15;
TMin 200;
pMin 1000;
minParticleMass 1e-15;
rho0 1000;
T0 300;
Cp0 4187;
youngsModulus 1e9;
poissonsRatio 0.35;
epsilon0 1;
f0 0.5;
Pr 0.7;
Tvap 273;
Tbp 373;
constantVolume false;
}
particleForces
{
gravity on;
virtualMass off;
pressureGradient off;
paramagnetic off;
}
subModels
{
InjectionModel none;
DragModel none;
DispersionModel none;
PatchInteractionModel none;
HeatTransferModel none;
CompositionModel none;
PhaseChangeModel none;
PostProcessingModel none;
CollisionModel none;
SurfaceFilmModel none;
radiation off;
}

View File

@ -0,0 +1,38 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object extrudeToRegionMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
region wallFilmRegion;
faceZones (wallFilmFaces);
adaptMesh true;
oneD false;
extrudeModel linearNormal;
nLayers 1;
expansionRatio 1;
linearNormalCoeffs
{
thickness 0.01;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //