Integrated Foundation code to commit 104aac5
This commit is contained in:
@ -16,6 +16,7 @@ $(KINEMATICMODELS)/force/forceList/forceList.C
|
||||
$(KINEMATICMODELS)/force/contactAngleForces/contactAngleForce/contactAngleForce.C
|
||||
$(KINEMATICMODELS)/force/contactAngleForces/distribution/distributionContactAngleForce.C
|
||||
$(KINEMATICMODELS)/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C
|
||||
$(KINEMATICMODELS)/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.C
|
||||
$(KINEMATICMODELS)/force/thermocapillaryForce/thermocapillaryForce.C
|
||||
|
||||
$(KINEMATICMODELS)/injectionModel/injectionModel/injectionModel.C
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,16 +36,16 @@ namespace surfaceFilmModels
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
filmSubModelBase::filmSubModelBase(surfaceFilmModel& owner)
|
||||
filmSubModelBase::filmSubModelBase(surfaceFilmModel& film)
|
||||
:
|
||||
subModelBase(owner.outputProperties()),
|
||||
owner_(owner)
|
||||
subModelBase(film.outputProperties()),
|
||||
filmModel_(film)
|
||||
{}
|
||||
|
||||
|
||||
filmSubModelBase::filmSubModelBase
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
const word& baseName,
|
||||
const word& modelType,
|
||||
@ -54,20 +54,20 @@ filmSubModelBase::filmSubModelBase
|
||||
:
|
||||
subModelBase
|
||||
(
|
||||
owner.outputProperties(),
|
||||
film.outputProperties(),
|
||||
dict,
|
||||
baseName,
|
||||
modelType,
|
||||
dictExt
|
||||
),
|
||||
owner_(owner)
|
||||
filmModel_(film)
|
||||
{}
|
||||
|
||||
|
||||
filmSubModelBase::filmSubModelBase
|
||||
(
|
||||
const word& modelName,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
const word& baseName,
|
||||
const word& modelType
|
||||
@ -76,12 +76,12 @@ filmSubModelBase::filmSubModelBase
|
||||
subModelBase
|
||||
(
|
||||
modelName,
|
||||
owner.outputProperties(),
|
||||
film.outputProperties(),
|
||||
dict,
|
||||
baseName,
|
||||
modelType
|
||||
),
|
||||
owner_(owner)
|
||||
filmModel_(film)
|
||||
{}
|
||||
|
||||
|
||||
@ -95,7 +95,7 @@ filmSubModelBase::~filmSubModelBase()
|
||||
|
||||
bool filmSubModelBase::writeTime() const
|
||||
{
|
||||
return active() && owner_.time().writeTime();
|
||||
return active() && filmModel_.time().writeTime();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -60,8 +60,8 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Reference to the owner surface film model
|
||||
surfaceFilmModel& owner_;
|
||||
//- Reference to the film surface film model
|
||||
surfaceFilmModel& filmModel_;
|
||||
|
||||
|
||||
public:
|
||||
@ -69,23 +69,23 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
filmSubModelBase(surfaceFilmModel& owner);
|
||||
filmSubModelBase(surfaceFilmModel& film);
|
||||
|
||||
//- Construct from owner film wihout name
|
||||
//- Construct from film film wihout name
|
||||
filmSubModelBase
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
const word& baseName,
|
||||
const word& modelType,
|
||||
const word& dictExt = "Coeffs"
|
||||
);
|
||||
|
||||
//- Construct from owner film with name
|
||||
//- Construct from film film with name
|
||||
filmSubModelBase
|
||||
(
|
||||
const word& modelName,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
const word& baseName,
|
||||
const word& modelType
|
||||
@ -103,11 +103,11 @@ public:
|
||||
//- Flag to indicate when to write a property
|
||||
virtual bool writeTime() const;
|
||||
|
||||
//- Return const access to the owner surface film model
|
||||
inline const surfaceFilmModel& owner() const;
|
||||
//- Return const access to the film surface film model
|
||||
inline const surfaceFilmModel& film() const;
|
||||
|
||||
//- Return the reference to the owner surface film model
|
||||
inline surfaceFilmModel& owner();
|
||||
//- Return the reference to the film surface film model
|
||||
inline surfaceFilmModel& film();
|
||||
|
||||
template<class FilmType>
|
||||
inline const FilmType& filmType() const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -34,15 +34,15 @@ namespace surfaceFilmModels
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
inline const surfaceFilmModel& filmSubModelBase::owner() const
|
||||
inline const surfaceFilmModel& filmSubModelBase::film() const
|
||||
{
|
||||
return owner_;
|
||||
return filmModel_;
|
||||
}
|
||||
|
||||
|
||||
inline surfaceFilmModel& filmSubModelBase::owner()
|
||||
inline surfaceFilmModel& filmSubModelBase::film()
|
||||
{
|
||||
return owner_;
|
||||
return filmModel_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -35,15 +35,15 @@ namespace surfaceFilmModels
|
||||
template<class FilmType>
|
||||
const FilmType& filmSubModelBase::filmType() const
|
||||
{
|
||||
if (!isA<FilmType>(owner_))
|
||||
if (!isA<FilmType>(filmModel_))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Model " << this->modelType() << " requested film type "
|
||||
<< FilmType::typeName << " but film is type " << owner_.type()
|
||||
<< FilmType::typeName << " but film is type " << filmModel_.type()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
return refCast<const FilmType>(owner_);
|
||||
return refCast<const FilmType>(filmModel_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -61,11 +61,11 @@ void constantFilmThermo::init(thermoData& td)
|
||||
|
||||
constantFilmThermo::constantFilmThermo
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmThermoModel(typeName, owner, dict),
|
||||
filmThermoModel(typeName, film, dict),
|
||||
name_(coeffDict_.lookup("specie")),
|
||||
rho0_("rho0"),
|
||||
mu0_("mu0"),
|
||||
@ -264,12 +264,12 @@ tmp<volScalarField> constantFilmThermo::rho() const
|
||||
IOobject
|
||||
(
|
||||
type() + ':' + rho0_.name_,
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
film().time().timeName(),
|
||||
film().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
film().regionMesh(),
|
||||
dimensionedScalar("0", dimDensity, 0.0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
@ -291,12 +291,12 @@ tmp<volScalarField> constantFilmThermo::mu() const
|
||||
IOobject
|
||||
(
|
||||
type() + ':' + mu0_.name_,
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
film().time().timeName(),
|
||||
film().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
film().regionMesh(),
|
||||
dimensionedScalar("0", dimPressure*dimTime, 0.0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
@ -318,12 +318,12 @@ tmp<volScalarField> constantFilmThermo::sigma() const
|
||||
IOobject
|
||||
(
|
||||
type() + ':' + sigma0_.name_,
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
film().time().timeName(),
|
||||
film().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
film().regionMesh(),
|
||||
dimensionedScalar("0", dimMass/sqr(dimTime), 0.0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
@ -345,12 +345,12 @@ tmp<volScalarField> constantFilmThermo::Cp() const
|
||||
IOobject
|
||||
(
|
||||
type() + ':' + Cp0_.name_,
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
film().time().timeName(),
|
||||
film().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
film().regionMesh(),
|
||||
dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
@ -372,12 +372,12 @@ tmp<volScalarField> constantFilmThermo::kappa() const
|
||||
IOobject
|
||||
(
|
||||
type() + ':' + kappa0_.name_,
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
film().time().timeName(),
|
||||
film().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
film().regionMesh(),
|
||||
dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -140,7 +140,7 @@ public:
|
||||
//- Construct from surface film model and dictionary
|
||||
constantFilmThermo
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -43,21 +43,21 @@ defineRunTimeSelectionTable(filmThermoModel, dictionary);
|
||||
|
||||
filmThermoModel::filmThermoModel
|
||||
(
|
||||
surfaceFilmModel& owner
|
||||
surfaceFilmModel& film
|
||||
)
|
||||
:
|
||||
filmSubModelBase(owner)
|
||||
filmSubModelBase(film)
|
||||
{}
|
||||
|
||||
|
||||
filmThermoModel::filmThermoModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmSubModelBase(owner, dict, typeName, modelType)
|
||||
filmSubModelBase(film, dict, typeName, modelType)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -81,22 +81,22 @@ public:
|
||||
filmThermoModel,
|
||||
dictionary,
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
),
|
||||
(owner, dict)
|
||||
(film, dict)
|
||||
);
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
filmThermoModel(surfaceFilmModel& owner);
|
||||
filmThermoModel(surfaceFilmModel& film);
|
||||
|
||||
//- Construct from type name, dictionary and surface film model
|
||||
filmThermoModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
@ -106,7 +106,7 @@ public:
|
||||
//- Return a reference to the selected phase change model
|
||||
static autoPtr<filmThermoModel> New
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -55,17 +55,17 @@ addToRunTimeSelectionTable
|
||||
|
||||
const thermoSingleLayer& liquidFilmThermo::thermoFilm() const
|
||||
{
|
||||
if (!isA<thermoSingleLayer>(owner_))
|
||||
if (!isA<thermoSingleLayer>(filmModel_))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Thermo model requires a " << thermoSingleLayer::typeName
|
||||
<< " film to supply the pressure and temperature, but "
|
||||
<< owner_.type() << " film model selected. "
|
||||
<< filmModel_.type() << " film model selected. "
|
||||
<< "Use the 'useReferenceValues' flag to employ reference "
|
||||
<< "pressure and temperature" << exit(FatalError);
|
||||
}
|
||||
|
||||
return refCast<const thermoSingleLayer>(owner_);
|
||||
return refCast<const thermoSingleLayer>(filmModel_);
|
||||
}
|
||||
|
||||
|
||||
@ -78,13 +78,13 @@ void liquidFilmThermo::initLiquid(const dictionary& dict)
|
||||
|
||||
dict.lookup("liquid") >> name_;
|
||||
|
||||
if (owner_.primaryMesh().foundObject<SLGThermo>("SLGThermo"))
|
||||
if (filmModel_.primaryMesh().foundObject<SLGThermo>("SLGThermo"))
|
||||
{
|
||||
// retrieve from film thermo
|
||||
ownLiquid_ = false;
|
||||
|
||||
const SLGThermo& thermo =
|
||||
owner_.primaryMesh().lookupObject<SLGThermo>("SLGThermo");
|
||||
filmModel_.primaryMesh().lookupObject<SLGThermo>("SLGThermo");
|
||||
label id = thermo.liquidId(name_);
|
||||
liquidPtr_ = &thermo.liquids().properties()[id];
|
||||
}
|
||||
@ -94,7 +94,7 @@ void liquidFilmThermo::initLiquid(const dictionary& dict)
|
||||
ownLiquid_ = true;
|
||||
|
||||
liquidPtr_ =
|
||||
liquidProperties::New(dict.subDict(name_ + "Coeffs")).ptr();
|
||||
liquidProperties::New(dict.optionalSubDict(name_ + "Coeffs")).ptr();
|
||||
}
|
||||
}
|
||||
|
||||
@ -103,11 +103,11 @@ void liquidFilmThermo::initLiquid(const dictionary& dict)
|
||||
|
||||
liquidFilmThermo::liquidFilmThermo
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmThermoModel(typeName, owner, dict),
|
||||
filmThermoModel(typeName, film, dict),
|
||||
name_("unknown_liquid"),
|
||||
liquidPtr_(nullptr),
|
||||
ownLiquid_(false),
|
||||
@ -245,12 +245,12 @@ tmp<volScalarField> liquidFilmThermo::rho() const
|
||||
IOobject
|
||||
(
|
||||
type() + ":rho",
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
film().time().timeName(),
|
||||
film().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
film().regionMesh(),
|
||||
dimensionedScalar("0", dimDensity, 0.0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
@ -290,12 +290,12 @@ tmp<volScalarField> liquidFilmThermo::mu() const
|
||||
IOobject
|
||||
(
|
||||
type() + ":mu",
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
film().time().timeName(),
|
||||
film().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
film().regionMesh(),
|
||||
dimensionedScalar("0", dimPressure*dimTime, 0.0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
@ -335,12 +335,12 @@ tmp<volScalarField> liquidFilmThermo::sigma() const
|
||||
IOobject
|
||||
(
|
||||
type() + ":sigma",
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
film().time().timeName(),
|
||||
film().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
film().regionMesh(),
|
||||
dimensionedScalar("0", dimMass/sqr(dimTime), 0.0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
@ -380,12 +380,12 @@ tmp<volScalarField> liquidFilmThermo::Cp() const
|
||||
IOobject
|
||||
(
|
||||
type() + ":Cp",
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
film().time().timeName(),
|
||||
film().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
film().regionMesh(),
|
||||
dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
@ -425,12 +425,12 @@ tmp<volScalarField> liquidFilmThermo::kappa() const
|
||||
IOobject
|
||||
(
|
||||
type() + ":kappa",
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
film().time().timeName(),
|
||||
film().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
film().regionMesh(),
|
||||
dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -107,7 +107,7 @@ public:
|
||||
//- Construct from surface film model and dictionary
|
||||
liquidFilmThermo
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -41,20 +41,20 @@ defineRunTimeSelectionTable(filmTurbulenceModel, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
filmTurbulenceModel::filmTurbulenceModel(surfaceFilmModel& owner)
|
||||
filmTurbulenceModel::filmTurbulenceModel(surfaceFilmModel& film)
|
||||
:
|
||||
filmSubModelBase(owner)
|
||||
filmSubModelBase(film)
|
||||
{}
|
||||
|
||||
|
||||
filmTurbulenceModel::filmTurbulenceModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmSubModelBase(owner, dict, typeName, modelType)
|
||||
filmSubModelBase(film, dict, typeName, modelType)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -83,22 +83,22 @@ public:
|
||||
filmTurbulenceModel,
|
||||
dictionary,
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
),
|
||||
(owner, dict)
|
||||
(film, dict)
|
||||
);
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
filmTurbulenceModel(surfaceFilmModel& owner);
|
||||
filmTurbulenceModel(surfaceFilmModel& film);
|
||||
|
||||
//- Construct from type name, dictionary and surface film model
|
||||
filmTurbulenceModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
@ -108,7 +108,7 @@ public:
|
||||
//- Return a reference to the selected injection model
|
||||
static autoPtr<filmTurbulenceModel> New
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -51,11 +51,11 @@ addToRunTimeSelectionTable(filmTurbulenceModel, laminar, dictionary);
|
||||
|
||||
laminar::laminar
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmTurbulenceModel(type(), owner, dict),
|
||||
filmTurbulenceModel(type(), film, dict),
|
||||
Cf_(readScalar(coeffDict_.lookup("Cf")))
|
||||
{}
|
||||
|
||||
@ -77,19 +77,19 @@ tmp<volVectorField> laminar::Us() const
|
||||
IOobject
|
||||
(
|
||||
typeName + ":Us",
|
||||
owner_.regionMesh().time().timeName(),
|
||||
owner_.regionMesh(),
|
||||
filmModel_.regionMesh().time().timeName(),
|
||||
filmModel_.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner_.regionMesh(),
|
||||
filmModel_.regionMesh(),
|
||||
dimensionedVector("zero", dimVelocity, Zero),
|
||||
extrapolatedCalculatedFvPatchVectorField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
// apply quadratic profile
|
||||
tUs.ref() = Foam::sqrt(2.0)*owner_.U();
|
||||
tUs.ref() = Foam::sqrt(2.0)*filmModel_.U();
|
||||
tUs.ref().correctBoundaryConditions();
|
||||
|
||||
return tUs;
|
||||
@ -105,12 +105,12 @@ tmp<volScalarField> laminar::mut() const
|
||||
IOobject
|
||||
(
|
||||
typeName + ":mut",
|
||||
owner_.regionMesh().time().timeName(),
|
||||
owner_.regionMesh(),
|
||||
filmModel_.regionMesh().time().timeName(),
|
||||
filmModel_.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner_.regionMesh(),
|
||||
filmModel_.regionMesh(),
|
||||
dimensionedScalar("zero", dimMass/dimLength/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
@ -125,7 +125,7 @@ tmp<fvVectorMatrix> laminar::Su(volVectorField& U) const
|
||||
{
|
||||
// local reference to film model
|
||||
const kinematicSingleLayer& film =
|
||||
static_cast<const kinematicSingleLayer&>(owner_);
|
||||
static_cast<const kinematicSingleLayer&>(filmModel_);
|
||||
|
||||
// local references to film fields
|
||||
const volScalarField& mu = film.mu();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -80,7 +80,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model
|
||||
laminar(surfaceFilmModel& owner, const dictionary& dict);
|
||||
laminar(surfaceFilmModel& film, const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -27,7 +27,6 @@ License
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvcGrad.H"
|
||||
#include "unitConversion.H"
|
||||
#include "fvPatchField.H"
|
||||
#include "meshWavePatchDistMethod.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -47,11 +46,14 @@ defineTypeNameAndDebug(contactAngleForce, 0);
|
||||
|
||||
void contactAngleForce::initialise()
|
||||
{
|
||||
const wordReList zeroForcePatches(coeffDict_.lookup("zeroForcePatches"));
|
||||
const wordReList zeroForcePatches
|
||||
(
|
||||
coeffDict_.lookupOrDefault<wordReList>("zeroForcePatches", wordReList())
|
||||
);
|
||||
|
||||
if (zeroForcePatches.size())
|
||||
{
|
||||
const polyBoundaryMesh& pbm = owner_.regionMesh().boundaryMesh();
|
||||
const polyBoundaryMesh& pbm = filmModel_.regionMesh().boundaryMesh();
|
||||
scalar dLim = readScalar(coeffDict_.lookup("zeroForceDistance"));
|
||||
|
||||
Info<< " Assigning zero contact force within " << dLim
|
||||
@ -66,19 +68,19 @@ void contactAngleForce::initialise()
|
||||
}
|
||||
|
||||
// Temporary implementation until run-time selection covers this case
|
||||
patchDistMethods::meshWave dist(owner_.regionMesh(), patchIDs);
|
||||
patchDistMethods::meshWave dist(filmModel_.regionMesh(), patchIDs);
|
||||
volScalarField y
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"y",
|
||||
owner_.regionMesh().time().timeName(),
|
||||
owner_.regionMesh(),
|
||||
filmModel_.regionMesh().time().timeName(),
|
||||
filmModel_.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
owner_.regionMesh(),
|
||||
filmModel_.regionMesh(),
|
||||
dimensionedScalar("y", dimLength, GREAT)
|
||||
);
|
||||
dist.correct(y);
|
||||
@ -93,23 +95,23 @@ void contactAngleForce::initialise()
|
||||
contactAngleForce::contactAngleForce
|
||||
(
|
||||
const word& typeName,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
force(typeName, owner, dict),
|
||||
force(typeName, film, dict),
|
||||
Ccf_(readScalar(coeffDict_.lookup("Ccf"))),
|
||||
mask_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ":contactForceMask",
|
||||
owner_.time().timeName(),
|
||||
owner_.regionMesh(),
|
||||
filmModel_.time().timeName(),
|
||||
filmModel_.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner_.regionMesh(),
|
||||
filmModel_.regionMesh(),
|
||||
dimensionedScalar("mask", dimless, 1.0)
|
||||
)
|
||||
{
|
||||
@ -134,25 +136,25 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U)
|
||||
IOobject
|
||||
(
|
||||
typeName + ":contactForce",
|
||||
owner_.time().timeName(),
|
||||
owner_.regionMesh(),
|
||||
filmModel_.time().timeName(),
|
||||
filmModel_.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner_.regionMesh(),
|
||||
filmModel_.regionMesh(),
|
||||
dimensionedVector("zero", dimForce/dimArea, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
vectorField& force = tForce.ref().primitiveFieldRef();
|
||||
|
||||
const labelUList& own = owner_.regionMesh().owner();
|
||||
const labelUList& nbr = owner_.regionMesh().neighbour();
|
||||
const labelUList& own = filmModel_.regionMesh().owner();
|
||||
const labelUList& nbr = filmModel_.regionMesh().neighbour();
|
||||
|
||||
const scalarField& magSf = owner_.magSf();
|
||||
const scalarField& magSf = filmModel_.magSf();
|
||||
|
||||
const volScalarField& alpha = owner_.alpha();
|
||||
const volScalarField& sigma = owner_.sigma();
|
||||
const volScalarField& alpha = filmModel_.alpha();
|
||||
const volScalarField& sigma = filmModel_.sigma();
|
||||
|
||||
const tmp<volScalarField> ttheta = theta();
|
||||
const volScalarField& theta = ttheta();
|
||||
@ -176,7 +178,7 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U)
|
||||
|
||||
if (celli != -1 && mask_[celli] > 0.5)
|
||||
{
|
||||
const scalar invDx = owner_.regionMesh().deltaCoeffs()[facei];
|
||||
const scalar invDx = filmModel_.regionMesh().deltaCoeffs()[facei];
|
||||
const vector n =
|
||||
gradAlpha[celli]/(mag(gradAlpha[celli]) + ROOTVSMALL);
|
||||
const scalar cosTheta = cos(degToRad(theta[celli]));
|
||||
@ -186,27 +188,29 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U)
|
||||
|
||||
forAll(alpha.boundaryField(), patchi)
|
||||
{
|
||||
if (!owner_.isCoupledPatch(patchi))
|
||||
if (!filmModel_.isCoupledPatch(patchi))
|
||||
{
|
||||
const fvPatchField<scalar>& alphaf = alpha.boundaryField()[patchi];
|
||||
const fvPatchField<scalar>& maskf = mask_.boundaryField()[patchi];
|
||||
const scalarField& invDx = alphaf.patch().deltaCoeffs();
|
||||
const labelUList& faceCells = alphaf.patch().faceCells();
|
||||
const fvPatchField<scalar>& alphaPf = alpha.boundaryField()[patchi];
|
||||
const fvPatchField<scalar>& maskPf = mask_.boundaryField()[patchi];
|
||||
const fvPatchField<scalar>& sigmaPf = sigma.boundaryField()[patchi];
|
||||
const fvPatchField<scalar>& thetaPf = theta.boundaryField()[patchi];
|
||||
const scalarField& invDx = alphaPf.patch().deltaCoeffs();
|
||||
const labelUList& faceCells = alphaPf.patch().faceCells();
|
||||
|
||||
forAll(alphaf, facei)
|
||||
forAll(alphaPf, facei)
|
||||
{
|
||||
if (maskf[facei] > 0.5)
|
||||
if (maskPf[facei] > 0.5)
|
||||
{
|
||||
label cellO = faceCells[facei];
|
||||
|
||||
if ((alpha[cellO] > 0.5) && (alphaf[facei] < 0.5))
|
||||
if ((alpha[cellO] > 0.5) && (alphaPf[facei] < 0.5))
|
||||
{
|
||||
const vector n =
|
||||
gradAlpha[cellO]
|
||||
/(mag(gradAlpha[cellO]) + ROOTVSMALL);
|
||||
const scalar cosTheta = cos(degToRad(theta[cellO]));
|
||||
const scalar cosTheta = cos(degToRad(thetaPf[facei]));
|
||||
force[cellO] +=
|
||||
Ccf_*n*sigma[cellO]*(1 - cosTheta)/invDx[facei];
|
||||
Ccf_*n*sigmaPf[facei]*(1 - cosTheta)/invDx[facei];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -215,13 +219,15 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U)
|
||||
|
||||
force /= magSf;
|
||||
|
||||
if (owner_.regionMesh().time().writeTime())
|
||||
if (filmModel_.regionMesh().time().writeTime())
|
||||
{
|
||||
tForce().write();
|
||||
}
|
||||
|
||||
tmp<fvVectorMatrix>
|
||||
tfvm(new fvVectorMatrix(U, dimForce/dimArea*dimVolume));
|
||||
tmp<fvVectorMatrix> tfvm
|
||||
(
|
||||
new fvVectorMatrix(U, dimForce/dimArea*dimVolume)
|
||||
);
|
||||
|
||||
tfvm.ref() += tForce;
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ public:
|
||||
contactAngleForce
|
||||
(
|
||||
const word& typeName,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -45,15 +45,15 @@ addToRunTimeSelectionTable(force, distributionContactAngleForce, dictionary);
|
||||
|
||||
distributionContactAngleForce::distributionContactAngleForce
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
contactAngleForce(typeName, owner, dict),
|
||||
contactAngleForce(typeName, film, dict),
|
||||
rndGen_(label(0), -1),
|
||||
distribution_
|
||||
(
|
||||
distributionModels::distributionModel::New
|
||||
distributionModel::New
|
||||
(
|
||||
coeffDict_.subDict("distribution"),
|
||||
rndGen_
|
||||
@ -79,10 +79,10 @@ tmp<volScalarField> distributionContactAngleForce::theta() const
|
||||
IOobject
|
||||
(
|
||||
typeName + ":theta",
|
||||
owner_.time().timeName(),
|
||||
owner_.regionMesh()
|
||||
filmModel_.time().timeName(),
|
||||
filmModel_.regionMesh()
|
||||
),
|
||||
owner_.regionMesh(),
|
||||
filmModel_.regionMesh(),
|
||||
dimensionedScalar("0", dimless, 0)
|
||||
)
|
||||
);
|
||||
@ -97,7 +97,7 @@ tmp<volScalarField> distributionContactAngleForce::theta() const
|
||||
|
||||
forAll(theta.boundaryField(), patchi)
|
||||
{
|
||||
if (!owner_.isCoupledPatch(patchi))
|
||||
if (!filmModel_.isCoupledPatch(patchi))
|
||||
{
|
||||
fvPatchField<scalar>& thetaf = theta.boundaryFieldRef()[patchi];
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ Description
|
||||
|
||||
See also
|
||||
Foam::regionModels::surfaceFilmModels::contactAngleForce
|
||||
Foam::distributionModels::distributionModel
|
||||
Foam::distributionModel
|
||||
|
||||
SourceFiles
|
||||
distributionContactAngleForce.C
|
||||
@ -53,7 +53,7 @@ namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class distributionContactAngleForce Declaration
|
||||
Class distributionContactAngleForce Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class distributionContactAngleForce
|
||||
@ -66,7 +66,7 @@ class distributionContactAngleForce
|
||||
cachedRandom rndGen_;
|
||||
|
||||
//- Parcel size PDF model
|
||||
const autoPtr<distributionModels::distributionModel> distribution_;
|
||||
const autoPtr<distributionModel> distribution_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
@ -95,7 +95,7 @@ public:
|
||||
//- Construct from surface film model
|
||||
distributionContactAngleForce
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -0,0 +1,139 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2017 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 "perturbedTemperatureDependentContactAngleForce.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(perturbedTemperatureDependentContactAngleForce, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
force,
|
||||
perturbedTemperatureDependentContactAngleForce,
|
||||
dictionary
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
perturbedTemperatureDependentContactAngleForce::
|
||||
perturbedTemperatureDependentContactAngleForce
|
||||
(
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
contactAngleForce(typeName, film, dict),
|
||||
thetaPtr_(Function1<scalar>::New("theta", coeffDict_)),
|
||||
rndGen_(label(0), -1),
|
||||
distribution_
|
||||
(
|
||||
distributionModel::New
|
||||
(
|
||||
coeffDict_.subDict("distribution"),
|
||||
rndGen_
|
||||
)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
perturbedTemperatureDependentContactAngleForce::
|
||||
~perturbedTemperatureDependentContactAngleForce()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
tmp<volScalarField>
|
||||
perturbedTemperatureDependentContactAngleForce::theta() const
|
||||
{
|
||||
tmp<volScalarField> ttheta
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ":theta",
|
||||
filmModel_.time().timeName(),
|
||||
filmModel_.regionMesh()
|
||||
),
|
||||
filmModel_.regionMesh(),
|
||||
dimensionedScalar("0", dimless, 0)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& theta = ttheta.ref();
|
||||
volScalarField::Internal& thetai = theta.ref();
|
||||
|
||||
const volScalarField& T = filmModel_.T();
|
||||
|
||||
// Initialize with the function of temperature
|
||||
thetai.field() = thetaPtr_->value(T());
|
||||
|
||||
// Add the stochastic perturbation
|
||||
forAll(thetai, celli)
|
||||
{
|
||||
thetai[celli] += distribution_->sample();
|
||||
}
|
||||
|
||||
forAll(theta.boundaryField(), patchi)
|
||||
{
|
||||
if (!filmModel_.isCoupledPatch(patchi))
|
||||
{
|
||||
fvPatchField<scalar>& thetaf = theta.boundaryFieldRef()[patchi];
|
||||
|
||||
// Initialize with the function of temperature
|
||||
thetaf = thetaPtr_->value(T.boundaryField()[patchi]);
|
||||
|
||||
// Add the stochastic perturbation
|
||||
forAll(thetaf, facei)
|
||||
{
|
||||
thetaf[facei] += distribution_->sample();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ttheta;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,134 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2017 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::regionModels::surfaceFilmModels::
|
||||
perturbedTemperatureDependentContactAngleForce
|
||||
|
||||
Description
|
||||
Temperature dependent contact angle force with a stochastic perturbation
|
||||
|
||||
The contact angle in degrees is specified as a Foam::Function1 type, to
|
||||
enable the use of, e.g. contant, polynomial, table values and the
|
||||
stochastic perturbation obtained from a
|
||||
Foam::distributionModels::distributionModel
|
||||
|
||||
See also
|
||||
Foam::regionModels::surfaceFilmModels::contactAngleForce
|
||||
Foam::regionModels::surfaceFilmModels::temperatureDependentContactAngleForce
|
||||
Foam::regionModels::surfaceFilmModels::distributionContactAngleForce
|
||||
Foam::Function1Types
|
||||
Foam::distributionModel
|
||||
|
||||
SourceFiles
|
||||
perturbedTemperatureDependentContactAngleForce.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef perturbedTemperatureDependentContactAngleForce_H
|
||||
#define perturbedTemperatureDependentContactAngleForce_H
|
||||
|
||||
#include "contactAngleForce.H"
|
||||
#include "Function1.H"
|
||||
#include "distributionModel.H"
|
||||
#include "cachedRandom.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class perturbedTemperatureDependentContactAngleForce Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class perturbedTemperatureDependentContactAngleForce
|
||||
:
|
||||
public contactAngleForce
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Contact angle function
|
||||
autoPtr<Function1<scalar>> thetaPtr_;
|
||||
|
||||
//- Random number generator
|
||||
cachedRandom rndGen_;
|
||||
|
||||
//- Parcel size PDF model
|
||||
const autoPtr<distributionModel> distribution_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
perturbedTemperatureDependentContactAngleForce
|
||||
(
|
||||
const perturbedTemperatureDependentContactAngleForce&
|
||||
);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const perturbedTemperatureDependentContactAngleForce&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
//- Return the contact angle field
|
||||
virtual tmp<volScalarField> theta() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("perturbedTemperatureDependentContactAngle");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model
|
||||
perturbedTemperatureDependentContactAngleForce
|
||||
(
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~perturbedTemperatureDependentContactAngleForce();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -50,11 +50,11 @@ addToRunTimeSelectionTable
|
||||
|
||||
temperatureDependentContactAngleForce::temperatureDependentContactAngleForce
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
contactAngleForce(typeName, owner, dict),
|
||||
contactAngleForce(typeName, film, dict),
|
||||
thetaPtr_(Function1<scalar>::New("theta", coeffDict_))
|
||||
{}
|
||||
|
||||
@ -76,23 +76,23 @@ tmp<volScalarField> temperatureDependentContactAngleForce::theta() const
|
||||
IOobject
|
||||
(
|
||||
typeName + ":theta",
|
||||
owner_.time().timeName(),
|
||||
owner_.regionMesh()
|
||||
filmModel_.time().timeName(),
|
||||
filmModel_.regionMesh()
|
||||
),
|
||||
owner_.regionMesh(),
|
||||
filmModel_.regionMesh(),
|
||||
dimensionedScalar("0", dimless, 0)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& theta = ttheta.ref();
|
||||
|
||||
const volScalarField& T = owner_.T();
|
||||
const volScalarField& T = filmModel_.T();
|
||||
|
||||
theta.ref().field() = thetaPtr_->value(T());
|
||||
|
||||
forAll(theta.boundaryField(), patchi)
|
||||
{
|
||||
if (!owner_.isCoupledPatch(patchi))
|
||||
if (!filmModel_.isCoupledPatch(patchi))
|
||||
{
|
||||
theta.boundaryFieldRef()[patchi] =
|
||||
thetaPtr_->value(T.boundaryField()[patchi]);
|
||||
|
||||
@ -27,7 +27,7 @@ Class
|
||||
Description
|
||||
Temperature dependent contact angle force
|
||||
|
||||
The contact angle in degrees is specified as a \c Function1 type, to
|
||||
The contact angle in degrees is specified as a Foam::Function1 type, to
|
||||
enable the use of, e.g. contant, polynomial, table values.
|
||||
|
||||
See also
|
||||
@ -55,7 +55,7 @@ namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class temperatureDependentContactAngleForce Declaration
|
||||
Class temperatureDependentContactAngleForce Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class temperatureDependentContactAngleForce
|
||||
@ -97,7 +97,7 @@ public:
|
||||
//- Construct from surface film model
|
||||
temperatureDependentContactAngleForce
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -41,20 +41,20 @@ defineRunTimeSelectionTable(force, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
force::force(surfaceFilmModel& owner)
|
||||
force::force(surfaceFilmModel& film)
|
||||
:
|
||||
filmSubModelBase(owner)
|
||||
filmSubModelBase(film)
|
||||
{}
|
||||
|
||||
|
||||
force::force
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmSubModelBase(owner, dict, typeName, modelType)
|
||||
filmSubModelBase(film, dict, typeName, modelType)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -82,22 +82,22 @@ public:
|
||||
force,
|
||||
dictionary,
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
),
|
||||
(owner, dict)
|
||||
(film, dict)
|
||||
);
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
force(surfaceFilmModel& owner);
|
||||
force(surfaceFilmModel& film);
|
||||
|
||||
//- Construct from type name, dictionary and surface film model
|
||||
force
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
@ -107,7 +107,7 @@ public:
|
||||
//- Return a reference to the selected force model
|
||||
static autoPtr<force> New
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
const word& modelType
|
||||
);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,7 +36,7 @@ namespace surfaceFilmModels
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
forceList::forceList(surfaceFilmModel& owner)
|
||||
forceList::forceList(surfaceFilmModel& film)
|
||||
:
|
||||
PtrList<force>()
|
||||
{}
|
||||
@ -44,7 +44,7 @@ forceList::forceList(surfaceFilmModel& owner)
|
||||
|
||||
forceList::forceList
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
@ -59,7 +59,7 @@ forceList::forceList
|
||||
|
||||
forAll(models, i)
|
||||
{
|
||||
set(i, force::New(owner, dict, models[i]));
|
||||
set(i, force::New(film, dict, models[i]));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -60,12 +60,12 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
forceList(surfaceFilmModel& owner);
|
||||
forceList(surfaceFilmModel& film);
|
||||
|
||||
//- Construct from type name, dictionary and surface film model
|
||||
forceList
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -45,11 +45,11 @@ addToRunTimeSelectionTable(force, thermocapillaryForce, dictionary);
|
||||
|
||||
thermocapillaryForce::thermocapillaryForce
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
force(owner)
|
||||
force(film)
|
||||
{}
|
||||
|
||||
|
||||
@ -63,8 +63,8 @@ thermocapillaryForce::~thermocapillaryForce()
|
||||
|
||||
tmp<fvVectorMatrix> thermocapillaryForce::correct(volVectorField& U)
|
||||
{
|
||||
const volScalarField& alpha = owner_.alpha();
|
||||
const volScalarField& sigma = owner_.sigma();
|
||||
const volScalarField& alpha = filmModel_.alpha();
|
||||
const volScalarField& sigma = filmModel_.sigma();
|
||||
|
||||
tmp<fvVectorMatrix>
|
||||
tfvm(new fvVectorMatrix(U, dimForce/dimArea*dimVolume));
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,7 +76,7 @@ public:
|
||||
//- Construct from surface film model
|
||||
thermocapillaryForce
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -45,15 +45,15 @@ addToRunTimeSelectionTable(injectionModel, BrunDrippingInjection, dictionary);
|
||||
|
||||
BrunDrippingInjection::BrunDrippingInjection
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
injectionModel(type(), owner, dict),
|
||||
injectionModel(type(), film, dict),
|
||||
ubarStar_(coeffDict_.lookupOrDefault("ubarStar", 1.62208)),
|
||||
dCoeff_(coeffDict_.lookupOrDefault("dCoeff", 3.3)),
|
||||
deltaStable_(coeffDict_.lookupOrDefault("deltaStable", scalar(0))),
|
||||
diameter_(owner.regionMesh().nCells(), -1.0)
|
||||
diameter_(film.regionMesh().nCells(), -1.0)
|
||||
{}
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ void BrunDrippingInjection::correct
|
||||
)
|
||||
{
|
||||
const kinematicSingleLayer& film =
|
||||
refCast<const kinematicSingleLayer>(this->owner());
|
||||
refCast<const kinematicSingleLayer>(this->film());
|
||||
|
||||
// Calculate available dripping mass
|
||||
tmp<volScalarField> tsinAlpha(film.gNorm()/mag(film.g()));
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -118,7 +118,7 @@ public:
|
||||
//- Construct from surface film model
|
||||
BrunDrippingInjection
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -65,7 +65,7 @@ tmp<volScalarField> curvatureSeparation::calcInvR1
|
||||
/*
|
||||
tmp<volScalarField> tinvR1
|
||||
(
|
||||
new volScalarField("invR1", fvc::div(owner().nHat()))
|
||||
new volScalarField("invR1", fvc::div(film().nHat()))
|
||||
);
|
||||
*/
|
||||
|
||||
@ -82,7 +82,7 @@ tmp<volScalarField> curvatureSeparation::calcInvR1
|
||||
|
||||
// apply defined patch radii
|
||||
const scalar rMin = 1e-6;
|
||||
const fvMesh& mesh = owner().regionMesh();
|
||||
const fvMesh& mesh = film().regionMesh();
|
||||
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
|
||||
forAll(definedPatchRadii_, i)
|
||||
{
|
||||
@ -115,7 +115,7 @@ tmp<scalarField> curvatureSeparation::calcCosAngle
|
||||
const surfaceScalarField& phi
|
||||
) const
|
||||
{
|
||||
const fvMesh& mesh = owner().regionMesh();
|
||||
const fvMesh& mesh = film().regionMesh();
|
||||
const vectorField nf(mesh.Sf()/mesh.magSf());
|
||||
const labelUList& own = mesh.owner();
|
||||
const labelUList& nbr = mesh.neighbour();
|
||||
@ -220,15 +220,15 @@ tmp<scalarField> curvatureSeparation::calcCosAngle
|
||||
|
||||
curvatureSeparation::curvatureSeparation
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
injectionModel(type(), owner, dict),
|
||||
gradNHat_(fvc::grad(owner.nHat())),
|
||||
injectionModel(type(), film, dict),
|
||||
gradNHat_(fvc::grad(film.nHat())),
|
||||
deltaByR1Min_(coeffDict_.lookupOrDefault<scalar>("deltaByR1Min", 0.0)),
|
||||
definedPatchRadii_(),
|
||||
magG_(mag(owner.g().value())),
|
||||
magG_(mag(film.g().value())),
|
||||
gHat_(Zero)
|
||||
{
|
||||
if (magG_ < ROOTVSMALL)
|
||||
@ -238,10 +238,10 @@ curvatureSeparation::curvatureSeparation
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
gHat_ = owner.g().value()/magG_;
|
||||
gHat_ = film.g().value()/magG_;
|
||||
|
||||
List<Tuple2<word, scalar>> prIn(coeffDict_.lookup("definedPatchRadii"));
|
||||
const wordList& allPatchNames = owner.regionMesh().boundaryMesh().names();
|
||||
const wordList& allPatchNames = film.regionMesh().boundaryMesh().names();
|
||||
|
||||
DynamicList<Tuple2<label, scalar>> prData(allPatchNames.size());
|
||||
|
||||
@ -284,7 +284,7 @@ void curvatureSeparation::correct
|
||||
)
|
||||
{
|
||||
const kinematicSingleLayer& film =
|
||||
refCast<const kinematicSingleLayer>(this->owner());
|
||||
refCast<const kinematicSingleLayer>(this->film());
|
||||
const fvMesh& mesh = film.regionMesh();
|
||||
|
||||
const volScalarField& delta = film.delta();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -121,7 +121,7 @@ public:
|
||||
//- Construct from surface film model
|
||||
curvatureSeparation
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -50,23 +50,23 @@ addToRunTimeSelectionTable(injectionModel, drippingInjection, dictionary);
|
||||
|
||||
drippingInjection::drippingInjection
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
injectionModel(type(), owner, dict),
|
||||
injectionModel(type(), film, dict),
|
||||
deltaStable_(readScalar(coeffDict_.lookup("deltaStable"))),
|
||||
particlesPerParcel_(readScalar(coeffDict_.lookup("particlesPerParcel"))),
|
||||
rndGen_(label(0), -1),
|
||||
parcelDistribution_
|
||||
(
|
||||
distributionModels::distributionModel::New
|
||||
distributionModel::New
|
||||
(
|
||||
coeffDict_.subDict("parcelDistribution"),
|
||||
rndGen_
|
||||
)
|
||||
),
|
||||
diameter_(owner.regionMesh().nCells(), -1.0)
|
||||
diameter_(film.regionMesh().nCells(), -1.0)
|
||||
{}
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ void drippingInjection::correct
|
||||
)
|
||||
{
|
||||
const kinematicSingleLayer& film =
|
||||
refCast<const kinematicSingleLayer>(this->owner());
|
||||
refCast<const kinematicSingleLayer>(this->film());
|
||||
|
||||
const scalar pi = constant::mathematical::pi;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -87,7 +87,7 @@ protected:
|
||||
cachedRandom rndGen_;
|
||||
|
||||
//- Parcel size PDF model
|
||||
const autoPtr<distributionModels::distributionModel>
|
||||
const autoPtr<distributionModel>
|
||||
parcelDistribution_;
|
||||
|
||||
//- Diameters of particles to inject into the dripping
|
||||
@ -105,7 +105,7 @@ public:
|
||||
//- Construct from surface film model
|
||||
drippingInjection
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -49,9 +49,9 @@ void injectionModel::addToInjectedMass(const scalar dMass)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
injectionModel::injectionModel(surfaceFilmModel& owner)
|
||||
injectionModel::injectionModel(surfaceFilmModel& film)
|
||||
:
|
||||
filmSubModelBase(owner),
|
||||
filmSubModelBase(film),
|
||||
injectedMass_(0.0)
|
||||
{}
|
||||
|
||||
@ -59,11 +59,11 @@ injectionModel::injectionModel(surfaceFilmModel& owner)
|
||||
injectionModel::injectionModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmSubModelBase(owner, dict, typeName, modelType),
|
||||
filmSubModelBase(film, dict, typeName, modelType),
|
||||
injectedMass_(0.0)
|
||||
{}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -98,23 +98,23 @@ public:
|
||||
injectionModel,
|
||||
dictionary,
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
),
|
||||
(owner, dict)
|
||||
(film, dict)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
injectionModel(surfaceFilmModel& owner);
|
||||
injectionModel(surfaceFilmModel& film);
|
||||
|
||||
//- Construct from type name, dictionary and surface film model
|
||||
injectionModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
@ -124,7 +124,7 @@ public:
|
||||
//- Return a reference to the selected injection model
|
||||
static autoPtr<injectionModel> New
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
const word& mdoelType
|
||||
);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,16 +36,16 @@ namespace surfaceFilmModels
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
injectionModelList::injectionModelList(surfaceFilmModel& owner)
|
||||
injectionModelList::injectionModelList(surfaceFilmModel& film)
|
||||
:
|
||||
PtrList<injectionModel>(),
|
||||
filmSubModelBase(owner)
|
||||
filmSubModelBase(film)
|
||||
{}
|
||||
|
||||
|
||||
injectionModelList::injectionModelList
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
@ -53,12 +53,12 @@ injectionModelList::injectionModelList
|
||||
filmSubModelBase
|
||||
(
|
||||
"injectionModelList",
|
||||
owner,
|
||||
film,
|
||||
dict,
|
||||
"injectionModelList",
|
||||
"injectionModelList"
|
||||
),
|
||||
massInjected_(owner.intCoupledPatchIDs().size(), 0.0)
|
||||
massInjected_(film.intCoupledPatchIDs().size(), 0.0)
|
||||
{
|
||||
const wordList activeModels(dict.lookup("injectionModels"));
|
||||
|
||||
@ -77,7 +77,7 @@ injectionModelList::injectionModelList
|
||||
forAllConstIter(wordHashSet, models, iter)
|
||||
{
|
||||
const word& model = iter.key();
|
||||
set(i, injectionModel::New(owner, dict, model));
|
||||
set(i, injectionModel::New(film, dict, model));
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@ -114,7 +114,7 @@ void injectionModelList::correct
|
||||
massToInject.correctBoundaryConditions();
|
||||
diameterToInject.correctBoundaryConditions();
|
||||
|
||||
const labelList& patchIDs = owner().intCoupledPatchIDs();
|
||||
const labelList& patchIDs = film().intCoupledPatchIDs();
|
||||
|
||||
forAll(patchIDs, i)
|
||||
{
|
||||
@ -127,7 +127,7 @@ void injectionModelList::correct
|
||||
|
||||
void injectionModelList::info(Ostream& os)
|
||||
{
|
||||
const polyBoundaryMesh& pbm = owner().regionMesh().boundaryMesh();
|
||||
const polyBoundaryMesh& pbm = film().regionMesh().boundaryMesh();
|
||||
|
||||
scalar injectedMass = 0;
|
||||
scalarField patchInjectedMasses(pbm.size(), 0);
|
||||
@ -157,7 +157,7 @@ void injectionModelList::info(Ostream& os)
|
||||
Pstream::listCombineGather(mass, plusEqOp<scalar>());
|
||||
mass += mass0;
|
||||
|
||||
const labelList& patchIDs = owner().intCoupledPatchIDs();
|
||||
const labelList& patchIDs = film().intCoupledPatchIDs();
|
||||
|
||||
forAll(patchIDs, i)
|
||||
{
|
||||
@ -166,7 +166,7 @@ void injectionModelList::info(Ostream& os)
|
||||
<< mass[i] << endl;
|
||||
}
|
||||
|
||||
if (owner().time().writeTime())
|
||||
if (film().time().writeTime())
|
||||
{
|
||||
setBaseProperty("massInjected", mass);
|
||||
massInjected_ = 0.0;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -79,12 +79,12 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
injectionModelList(surfaceFilmModel& owner);
|
||||
injectionModelList(surfaceFilmModel& film);
|
||||
|
||||
//- Construct from type name, dictionary and surface film model
|
||||
injectionModelList
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -44,14 +44,14 @@ addToRunTimeSelectionTable(injectionModel, patchInjection, dictionary);
|
||||
|
||||
patchInjection::patchInjection
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
injectionModel(type(), owner, dict),
|
||||
injectionModel(type(), film, dict),
|
||||
deltaStable_(coeffDict_.lookupOrDefault<scalar>("deltaStable", 0.0))
|
||||
{
|
||||
const polyBoundaryMesh& pbm = owner.regionMesh().boundaryMesh();
|
||||
const polyBoundaryMesh& pbm = film.regionMesh().boundaryMesh();
|
||||
patchIDs_.setSize(pbm.size());
|
||||
|
||||
if (coeffDict_.found("patches"))
|
||||
@ -110,11 +110,11 @@ void patchInjection::correct
|
||||
// Do not correct if no patches selected
|
||||
if (!patchIDs_.size()) return;
|
||||
|
||||
const scalarField& delta = owner().delta();
|
||||
const scalarField& rho = owner().rho();
|
||||
const scalarField& magSf = owner().magSf();
|
||||
const scalarField& delta = film().delta();
|
||||
const scalarField& rho = film().rho();
|
||||
const scalarField& magSf = film().magSf();
|
||||
|
||||
const polyBoundaryMesh& pbm = owner().regionMesh().boundaryMesh();
|
||||
const polyBoundaryMesh& pbm = film().regionMesh().boundaryMesh();
|
||||
|
||||
forAll(patchIDs_, pidi)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -86,7 +86,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model
|
||||
patchInjection(surfaceFilmModel& owner, const dictionary& dict);
|
||||
patchInjection(surfaceFilmModel& film, const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -51,34 +51,34 @@ addToRunTimeSelectionTable
|
||||
|
||||
constantRadiation::constantRadiation
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmRadiationModel(typeName, owner, dict),
|
||||
QrConst_
|
||||
filmRadiationModel(typeName, film, dict),
|
||||
qrConst_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ":QrConst",
|
||||
owner.time().timeName(),
|
||||
owner.regionMesh(),
|
||||
typeName + ":qrConst",
|
||||
film.time().timeName(),
|
||||
film.regionMesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
owner.regionMesh()
|
||||
film.regionMesh()
|
||||
),
|
||||
mask_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ":mask",
|
||||
owner.time().timeName(),
|
||||
owner.regionMesh(),
|
||||
film.time().timeName(),
|
||||
film.regionMesh(),
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
owner.regionMesh(),
|
||||
film.regionMesh(),
|
||||
dimensionedScalar("one", dimless, 1.0)
|
||||
),
|
||||
absorptivity_(readScalar(coeffDict_.lookup("absorptivity"))),
|
||||
@ -110,25 +110,25 @@ tmp<volScalarField> constantRadiation::Shs()
|
||||
IOobject
|
||||
(
|
||||
typeName + ":Shs",
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
film().time().timeName(),
|
||||
film().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
film().regionMesh(),
|
||||
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
const scalar time = owner().time().value();
|
||||
const scalar time = film().time().value();
|
||||
|
||||
if ((time >= timeStart_) && (time <= timeStart_ + duration_))
|
||||
{
|
||||
scalarField& Shs = tShs.ref();
|
||||
const scalarField& Qr = QrConst_;
|
||||
const scalarField& alpha = owner_.alpha();
|
||||
const scalarField& qr = qrConst_;
|
||||
const scalarField& alpha = filmModel_.alpha();
|
||||
|
||||
Shs = mask_*Qr*alpha*absorptivity_;
|
||||
Shs = mask_*qr*alpha*absorptivity_;
|
||||
}
|
||||
|
||||
return tShs;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -63,7 +63,7 @@ private:
|
||||
// Private data
|
||||
|
||||
//- Constant radiative flux [kg/s3]
|
||||
volScalarField QrConst_;
|
||||
volScalarField qrConst_;
|
||||
|
||||
//- Radiation mask
|
||||
volScalarField mask_;
|
||||
@ -98,7 +98,7 @@ public:
|
||||
//- Construct from surface film model and dictionary
|
||||
constantRadiation
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
@ -115,7 +115,7 @@ public:
|
||||
virtual void correct();
|
||||
|
||||
//- Return the radiation sensible enthalpy source
|
||||
// Also updates QrNet
|
||||
// Also updates qrNet
|
||||
virtual tmp<volScalarField> Shs();
|
||||
};
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -41,20 +41,20 @@ defineRunTimeSelectionTable(filmRadiationModel, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
filmRadiationModel::filmRadiationModel(surfaceFilmModel& owner)
|
||||
filmRadiationModel::filmRadiationModel(surfaceFilmModel& film)
|
||||
:
|
||||
filmSubModelBase(owner)
|
||||
filmSubModelBase(film)
|
||||
{}
|
||||
|
||||
|
||||
filmRadiationModel::filmRadiationModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmSubModelBase(owner, dict, typeName, modelType)
|
||||
filmSubModelBase(film, dict, typeName, modelType)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -81,22 +81,22 @@ public:
|
||||
filmRadiationModel,
|
||||
dictionary,
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
),
|
||||
(owner, dict)
|
||||
(film, dict)
|
||||
);
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
filmRadiationModel(surfaceFilmModel& owner);
|
||||
filmRadiationModel(surfaceFilmModel& film);
|
||||
|
||||
//- Construct from type name, dictionary and surface film model
|
||||
filmRadiationModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
@ -106,7 +106,7 @@ public:
|
||||
//- Return a reference to the selected phase change model
|
||||
static autoPtr<filmRadiationModel> New
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -51,11 +51,11 @@ addToRunTimeSelectionTable
|
||||
|
||||
noRadiation::noRadiation
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmRadiationModel(owner)
|
||||
filmRadiationModel(film)
|
||||
{}
|
||||
|
||||
|
||||
@ -80,12 +80,12 @@ tmp<volScalarField> noRadiation::Shs()
|
||||
IOobject
|
||||
(
|
||||
typeName + ":Shs",
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
film().time().timeName(),
|
||||
film().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
film().regionMesh(),
|
||||
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -77,7 +77,7 @@ public:
|
||||
//- Construct from surface film model and dictionary
|
||||
noRadiation
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -51,24 +51,24 @@ addToRunTimeSelectionTable
|
||||
|
||||
primaryRadiation::primaryRadiation
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmRadiationModel(typeName, owner, dict),
|
||||
filmRadiationModel(typeName, film, dict),
|
||||
QinPrimary_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Qin", // same name as Qin on primary region to enable mapping
|
||||
owner.time().timeName(),
|
||||
owner.regionMesh(),
|
||||
film.time().timeName(),
|
||||
film.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner.regionMesh(),
|
||||
film.regionMesh(),
|
||||
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
|
||||
owner.mappedPushedFieldPatchTypes<scalar>()
|
||||
film.mappedPushedFieldPatchTypes<scalar>()
|
||||
)
|
||||
{}
|
||||
|
||||
@ -97,19 +97,19 @@ tmp<volScalarField> primaryRadiation::Shs()
|
||||
IOobject
|
||||
(
|
||||
typeName + ":Shs",
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
film().time().timeName(),
|
||||
film().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
film().regionMesh(),
|
||||
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& Shs = tShs.ref();
|
||||
const scalarField& QinP = QinPrimary_;
|
||||
const scalarField& alpha = owner_.alpha();
|
||||
const scalarField& alpha = filmModel_.alpha();
|
||||
|
||||
Shs = QinP*alpha;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -84,7 +84,7 @@ public:
|
||||
//- Construct from surface film model and dictionary
|
||||
primaryRadiation
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
@ -101,7 +101,7 @@ public:
|
||||
virtual void correct();
|
||||
|
||||
//- Return the radiation sensible enthalpy source
|
||||
// Also updates QrNet
|
||||
// Also updates qrNet
|
||||
virtual tmp<volScalarField> Shs();
|
||||
};
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -52,36 +52,36 @@ addToRunTimeSelectionTable
|
||||
|
||||
standardRadiation::standardRadiation
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmRadiationModel(typeName, owner, dict),
|
||||
filmRadiationModel(typeName, film, dict),
|
||||
QinPrimary_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Qin", // same name as Qin on primary region to enable mapping
|
||||
owner.time().timeName(),
|
||||
owner.regionMesh(),
|
||||
film.time().timeName(),
|
||||
film.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner.regionMesh(),
|
||||
film.regionMesh(),
|
||||
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
|
||||
owner.mappedPushedFieldPatchTypes<scalar>()
|
||||
film.mappedPushedFieldPatchTypes<scalar>()
|
||||
),
|
||||
QrNet_
|
||||
qrNet_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"QrNet",
|
||||
owner.time().timeName(),
|
||||
owner.regionMesh(),
|
||||
"qrNet",
|
||||
film.time().timeName(),
|
||||
film.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner.regionMesh(),
|
||||
film.regionMesh(),
|
||||
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
),
|
||||
@ -100,7 +100,7 @@ standardRadiation::~standardRadiation()
|
||||
|
||||
void standardRadiation::correct()
|
||||
{
|
||||
// Transfer Qr from primary region
|
||||
// Transfer qr from primary region
|
||||
QinPrimary_.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
@ -114,26 +114,26 @@ tmp<volScalarField> standardRadiation::Shs()
|
||||
IOobject
|
||||
(
|
||||
typeName + ":Shs",
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
film().time().timeName(),
|
||||
film().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
film().regionMesh(),
|
||||
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& Shs = tShs.ref();
|
||||
const scalarField& QinP = QinPrimary_;
|
||||
const scalarField& delta = owner_.delta();
|
||||
const scalarField& alpha = owner_.alpha();
|
||||
const scalarField& delta = filmModel_.delta();
|
||||
const scalarField& alpha = filmModel_.alpha();
|
||||
|
||||
Shs = beta_*QinP*alpha*(1.0 - exp(-kappaBar_*delta));
|
||||
|
||||
// Update net Qr on local region
|
||||
QrNet_.primitiveFieldRef() = QinP - Shs;
|
||||
QrNet_.correctBoundaryConditions();
|
||||
// Update net qr on local region
|
||||
qrNet_.primitiveFieldRef() = QinP - Shs;
|
||||
qrNet_.correctBoundaryConditions();
|
||||
|
||||
return tShs;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -63,7 +63,7 @@ private:
|
||||
volScalarField QinPrimary_;
|
||||
|
||||
//- Remaining radiative flux after removing local contribution
|
||||
volScalarField QrNet_;
|
||||
volScalarField qrNet_;
|
||||
|
||||
|
||||
// Model coefficients
|
||||
@ -95,7 +95,7 @@ public:
|
||||
//- Construct from surface film model and dictionary
|
||||
standardRadiation
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
@ -112,7 +112,7 @@ public:
|
||||
virtual void correct();
|
||||
|
||||
//- Return the radiation sensible enthalpy source
|
||||
// Also updates QrNet
|
||||
// Also updates qrNet
|
||||
virtual tmp<volScalarField> Shs();
|
||||
};
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -51,13 +51,13 @@ addToRunTimeSelectionTable
|
||||
|
||||
ArrheniusViscosity::ArrheniusViscosity
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
)
|
||||
:
|
||||
filmViscosityModel(typeName, owner, dict, mu),
|
||||
viscosity_(filmViscosityModel::New(owner, coeffDict_, mu)),
|
||||
filmViscosityModel(typeName, film, dict, mu),
|
||||
viscosity_(filmViscosityModel::New(film, coeffDict_, mu)),
|
||||
k1_("k1", dimTemperature, coeffDict_),
|
||||
k2_("k2", dimTemperature, coeffDict_),
|
||||
Tref_("Tref", dimTemperature, coeffDict_)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -100,7 +100,7 @@ public:
|
||||
//- Construct from surface film model
|
||||
ArrheniusViscosity
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -50,12 +50,12 @@ addToRunTimeSelectionTable
|
||||
|
||||
constantViscosity::constantViscosity
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
)
|
||||
:
|
||||
filmViscosityModel(typeName, owner, dict, mu),
|
||||
filmViscosityModel(typeName, film, dict, mu),
|
||||
mu0_("mu0", dimDynamicViscosity, coeffDict_)
|
||||
{
|
||||
mu_ == mu0_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -83,7 +83,7 @@ public:
|
||||
//- Construct from surface film model
|
||||
constantViscosity
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -44,12 +44,12 @@ defineRunTimeSelectionTable(filmViscosityModel, dictionary);
|
||||
filmViscosityModel::filmViscosityModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
)
|
||||
:
|
||||
filmSubModelBase(owner, dict, typeName, modelType),
|
||||
filmSubModelBase(film, dict, typeName, modelType),
|
||||
mu_(mu)
|
||||
{}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -90,11 +90,11 @@ public:
|
||||
filmViscosityModel,
|
||||
dictionary,
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
),
|
||||
(owner, dict, mu)
|
||||
(film, dict, mu)
|
||||
);
|
||||
|
||||
// Constructors
|
||||
@ -103,7 +103,7 @@ public:
|
||||
filmViscosityModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
);
|
||||
@ -114,7 +114,7 @@ public:
|
||||
//- Return a reference to the selected phase change model
|
||||
static autoPtr<filmViscosityModel> New
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -51,12 +51,12 @@ addToRunTimeSelectionTable
|
||||
|
||||
liquidViscosity::liquidViscosity
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
)
|
||||
:
|
||||
filmViscosityModel(typeName, owner, dict, mu)
|
||||
filmViscosityModel(typeName, film, dict, mu)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -82,7 +82,7 @@ public:
|
||||
//- Construct from surface film model
|
||||
liquidViscosity
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -57,12 +57,12 @@ addToRunTimeSelectionTable
|
||||
|
||||
thixotropicViscosity::thixotropicViscosity
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
)
|
||||
:
|
||||
filmViscosityModel(typeName, owner, dict, mu),
|
||||
filmViscosityModel(typeName, film, dict, mu),
|
||||
a_("a", dimless/dimTime, coeffDict_),
|
||||
b_("b", dimless, coeffDict_),
|
||||
d_("d", dimless, coeffDict_),
|
||||
@ -75,12 +75,12 @@ thixotropicViscosity::thixotropicViscosity
|
||||
IOobject
|
||||
(
|
||||
typeName + ":lambda",
|
||||
owner.regionMesh().time().timeName(),
|
||||
owner.regionMesh(),
|
||||
film.regionMesh().time().timeName(),
|
||||
film.regionMesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
owner.regionMesh()
|
||||
film.regionMesh()
|
||||
)
|
||||
{
|
||||
lambda_.min(1.0);
|
||||
@ -115,7 +115,7 @@ void thixotropicViscosity::correct
|
||||
const volScalarField& deltaRho = film.deltaRho();
|
||||
const surfaceScalarField& phi = film.phi();
|
||||
const volScalarField& alpha = film.alpha();
|
||||
const Time& runTime = this->owner().regionMesh().time();
|
||||
const Time& runTime = this->film().regionMesh().time();
|
||||
|
||||
// Shear rate
|
||||
volScalarField gDot("gDot", alpha*mag(U - Uw)/(delta + film.deltaSmall()));
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -140,7 +140,7 @@ public:
|
||||
//- Construct from surface film model
|
||||
thixotropicViscosity
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
);
|
||||
|
||||
@ -51,11 +51,11 @@ addToRunTimeSelectionTable
|
||||
|
||||
constantHeatTransfer::constantHeatTransfer
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
heatTransferModel(typeName, owner, dict),
|
||||
heatTransferModel(typeName, film, dict),
|
||||
c0_(readScalar(coeffDict_.lookup("c0")))
|
||||
{}
|
||||
|
||||
@ -81,13 +81,13 @@ tmp<volScalarField> constantHeatTransfer::h() const
|
||||
IOobject
|
||||
(
|
||||
"htc",
|
||||
owner_.time().timeName(),
|
||||
owner_.regionMesh(),
|
||||
filmModel_.time().timeName(),
|
||||
filmModel_.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
owner_.regionMesh(),
|
||||
filmModel_.regionMesh(),
|
||||
dimensionedScalar
|
||||
(
|
||||
"c0",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -83,7 +83,7 @@ public:
|
||||
//- Construct from surface film model and dictionary
|
||||
constantHeatTransfer
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -43,21 +43,21 @@ defineRunTimeSelectionTable(heatTransferModel, dictionary);
|
||||
|
||||
heatTransferModel::heatTransferModel
|
||||
(
|
||||
surfaceFilmModel& owner
|
||||
surfaceFilmModel& film
|
||||
)
|
||||
:
|
||||
filmSubModelBase(owner)
|
||||
filmSubModelBase(film)
|
||||
{}
|
||||
|
||||
|
||||
heatTransferModel::heatTransferModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmSubModelBase(owner, dict, typeName, modelType)
|
||||
filmSubModelBase(film, dict, typeName, modelType)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -81,22 +81,22 @@ public:
|
||||
heatTransferModel,
|
||||
dictionary,
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
),
|
||||
(owner, dict)
|
||||
(film, dict)
|
||||
);
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
heatTransferModel(surfaceFilmModel& owner);
|
||||
heatTransferModel(surfaceFilmModel& film);
|
||||
|
||||
//- Construct from type name, dictionary and surface film model
|
||||
heatTransferModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
@ -106,7 +106,7 @@ public:
|
||||
//- Return a reference to the selected phase change model
|
||||
static autoPtr<heatTransferModel> New
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -52,36 +52,36 @@ addToRunTimeSelectionTable
|
||||
|
||||
mappedConvectiveHeatTransfer::mappedConvectiveHeatTransfer
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
heatTransferModel(owner),
|
||||
heatTransferModel(film),
|
||||
htcConvPrimary_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"htcConv",
|
||||
owner.time().timeName(),
|
||||
owner.primaryMesh(),
|
||||
film.time().timeName(),
|
||||
film.primaryMesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
owner.primaryMesh()
|
||||
film.primaryMesh()
|
||||
),
|
||||
htcConvFilm_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
htcConvPrimary_.name(), // must have same name as above for mapping
|
||||
owner.time().timeName(),
|
||||
owner.regionMesh(),
|
||||
film.time().timeName(),
|
||||
film.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner.regionMesh(),
|
||||
film.regionMesh(),
|
||||
dimensionedScalar("zero", dimMass/pow3(dimTime)/dimTemperature, 0.0),
|
||||
owner.mappedPushedFieldPatchTypes<scalar>()
|
||||
film.mappedPushedFieldPatchTypes<scalar>()
|
||||
)
|
||||
{
|
||||
// Update the primary-side convective heat transfer coefficient
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -89,7 +89,7 @@ public:
|
||||
//- Construct from surface film model and dictionary
|
||||
mappedConvectiveHeatTransfer
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -44,11 +44,11 @@ addToRunTimeSelectionTable(phaseChangeModel, noPhaseChange, dictionary);
|
||||
|
||||
noPhaseChange::noPhaseChange
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary&
|
||||
)
|
||||
:
|
||||
phaseChangeModel(owner)
|
||||
phaseChangeModel(film)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -74,7 +74,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model
|
||||
noPhaseChange(surfaceFilmModel& owner, const dictionary& dict);
|
||||
noPhaseChange(surfaceFilmModel& film, const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -43,10 +43,10 @@ defineRunTimeSelectionTable(phaseChangeModel, dictionary);
|
||||
|
||||
phaseChangeModel::phaseChangeModel
|
||||
(
|
||||
surfaceFilmModel& owner
|
||||
surfaceFilmModel& film
|
||||
)
|
||||
:
|
||||
filmSubModelBase(owner),
|
||||
filmSubModelBase(film),
|
||||
latestMassPC_(0.0),
|
||||
totalMassPC_(0.0)
|
||||
{}
|
||||
@ -55,11 +55,11 @@ phaseChangeModel::phaseChangeModel
|
||||
phaseChangeModel::phaseChangeModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmSubModelBase(owner, dict, typeName, modelType),
|
||||
filmSubModelBase(film, dict, typeName, modelType),
|
||||
latestMassPC_(0.0),
|
||||
totalMassPC_(0.0)
|
||||
{}
|
||||
@ -114,7 +114,7 @@ void phaseChangeModel::info(Ostream& os) const
|
||||
{
|
||||
const scalar massPCRate =
|
||||
returnReduce(latestMassPC_, sumOp<scalar>())
|
||||
/owner_.time().deltaTValue();
|
||||
/filmModel_.time().deltaTValue();
|
||||
|
||||
scalar phaseChangeMass = getModelProperty<scalar>("phaseChangeMass");
|
||||
phaseChangeMass += returnReduce(totalMassPC_, sumOp<scalar>());
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -93,22 +93,22 @@ public:
|
||||
phaseChangeModel,
|
||||
dictionary,
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
),
|
||||
(owner, dict)
|
||||
(film, dict)
|
||||
);
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
phaseChangeModel(surfaceFilmModel& owner);
|
||||
phaseChangeModel(surfaceFilmModel& film);
|
||||
|
||||
//- Construct from type name, dictionary and surface film model
|
||||
phaseChangeModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
@ -118,7 +118,7 @@ public:
|
||||
//- Return a reference to the selected phase change model
|
||||
static autoPtr<phaseChangeModel> New
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -51,11 +51,11 @@ addToRunTimeSelectionTable
|
||||
|
||||
solidification::solidification
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
phaseChangeModel(typeName, owner, dict),
|
||||
phaseChangeModel(typeName, film, dict),
|
||||
T0_(readScalar(coeffDict_.lookup("T0"))),
|
||||
maxSolidificationFrac_
|
||||
(
|
||||
@ -76,12 +76,12 @@ solidification::solidification
|
||||
IOobject
|
||||
(
|
||||
typeName + ":mass",
|
||||
owner.regionMesh().time().timeName(),
|
||||
owner.regionMesh(),
|
||||
film.regionMesh().time().timeName(),
|
||||
film.regionMesh(),
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
owner.regionMesh(),
|
||||
film.regionMesh(),
|
||||
dimensionedScalar("zero", dimMass, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
),
|
||||
@ -90,12 +90,12 @@ solidification::solidification
|
||||
IOobject
|
||||
(
|
||||
typeName + ":thickness",
|
||||
owner.regionMesh().time().timeName(),
|
||||
owner.regionMesh(),
|
||||
film.regionMesh().time().timeName(),
|
||||
film.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
owner.regionMesh(),
|
||||
film.regionMesh(),
|
||||
dimensionedScalar("zero", dimLength, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
)
|
||||
@ -128,7 +128,7 @@ void solidification::correctModel
|
||||
maxSolidificationFrac_,
|
||||
(
|
||||
maxSolidificationRate_
|
||||
*owner_.regionMesh().time().deltaTValue()
|
||||
*filmModel_.regionMesh().time().deltaTValue()
|
||||
).value()
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -96,7 +96,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model
|
||||
solidification(surfaceFilmModel& owner, const dictionary& dict);
|
||||
solidification(surfaceFilmModel& film, const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -70,11 +70,11 @@ scalar standardPhaseChange::Sh
|
||||
|
||||
standardPhaseChange::standardPhaseChange
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
phaseChangeModel(typeName, owner, dict),
|
||||
phaseChangeModel(typeName, film, dict),
|
||||
deltaMin_(readScalar(coeffDict_.lookup("deltaMin"))),
|
||||
L_(readScalar(coeffDict_.lookup("L"))),
|
||||
TbFactor_(coeffDict_.lookupOrDefault<scalar>("TbFactor", 1.1))
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -97,7 +97,7 @@ public:
|
||||
//- Construct from surface film model
|
||||
standardPhaseChange
|
||||
(
|
||||
surfaceFilmModel& owner,
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user