Skip to content
Snippets Groups Projects

Feature.interPCFoam

Merged Sergio Ferraris requested to merge feature.interPCFoam into develop
All threads resolved!
Files
85
@@ -50,6 +50,44 @@ Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::Lee
@@ -50,6 +50,44 @@ Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::Lee
template<class Thermo, class OtherThermo>
template<class Thermo, class OtherThermo>
Foam::tmp<Foam::volScalarField>
Foam::tmp<Foam::volScalarField>
Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::Kexp
Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::Kexp
 
(
 
const volScalarField& refValue
 
)
 
{
 
{
 
const volScalarField from
 
(
 
min(max(this->pair().from(), scalar(0)), scalar(1))
 
);
 
 
const volScalarField coeff
 
(
 
C_*from*this->pair().from().rho()*pos(from - alphaMin_)
 
*(refValue - Tactivate_)
 
/Tactivate_
 
);
 
 
if (sign(C_.value()) > 0)
 
{
 
return
 
(
 
coeff*pos(refValue - Tactivate_)
 
);
 
}
 
else
 
{
 
return
 
(
 
coeff*pos(Tactivate_ - refValue)
 
);
 
}
 
}
 
}
 
 
 
template<class Thermo, class OtherThermo>
 
Foam::tmp<Foam::volScalarField>
 
Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::KSp
(
(
label variable,
label variable,
const volScalarField& refValue
const volScalarField& refValue
@@ -61,31 +99,68 @@ Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::Kexp
@@ -61,31 +99,68 @@ Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::Kexp
(
(
min(max(this->pair().from(), scalar(0)), scalar(1))
min(max(this->pair().from(), scalar(0)), scalar(1))
);
);
 
 
const volScalarField coeff
 
(
 
C_*from*this->pair().from().rho()*pos(from - alphaMin_)
 
/Tactivate_
 
);
if (sign(C_.value()) > 0)
if (sign(C_.value()) > 0)
{
{
return
return
(
(
C_
coeff*pos(refValue - Tactivate_)
* from
* this->pair().from().rho()
* (refValue.oldTime() - Tactivate_)
* pos(from - alphaMin_)
* pos(refValue.oldTime() - Tactivate_)/Tactivate_
);
);
}
}
else
else
{
{
return
return
(
(
-C_
coeff*pos(Tactivate_ - refValue)
* from
* this->pair().from().rho()
* pos(from - alphaMin_)
* (Tactivate_ - refValue.oldTime())
* pos(Tactivate_ - refValue.oldTime())/Tactivate_
);
);
 
}
 
}
 
else
 
{
 
return tmp<volScalarField> ();
 
}
 
}
 
 
template<class Thermo, class OtherThermo>
 
Foam::tmp<Foam::volScalarField>
 
Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::KSu
 
(
 
label variable,
 
const volScalarField& refValue
 
)
 
{
 
if (this->modelVariable_ == variable)
 
{
 
volScalarField from
 
(
 
min(max(this->pair().from(), scalar(0)), scalar(1))
 
);
 
 
const volScalarField coeff
 
(
 
C_*from*this->pair().from().rho()*pos(from - alphaMin_)
 
);
 
 
if (sign(C_.value()) > 0)
 
{
 
return
 
(
 
-coeff*pos(refValue - Tactivate_)
 
);
 
}
 
else
 
{
 
return
 
(
 
coeff*pos(Tactivate_ - refValue)
 
);
}
}
}
}
else
else
@@ -103,4 +178,12 @@ Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::Tactivate() const
@@ -103,4 +178,12 @@ Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::Tactivate() const
}
}
 
template<class Thermo, class OtherThermo>
 
bool
 
Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::includeDivU()
 
{
 
return true;
 
}
 
 
// ************************************************************************* //
// ************************************************************************* //
Loading