Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
365210a8
Commit
365210a8
authored
Dec 06, 2012
by
andy
Browse files
ENH: Updated maxwellSlipU BC
parent
9e8295f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C
View file @
365210a8
...
...
@@ -30,20 +30,20 @@ License
#include
"volFields.H"
#include
"fvcGrad.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
maxwellSlipUFvPatchVectorField
::
maxwellSlipUFvPatchVectorField
Foam
::
maxwellSlipUFvPatchVectorField
::
maxwellSlipUFvPatchVectorField
(
const
fvPatch
&
p
,
const
DimensionedField
<
vector
,
volMesh
>&
iF
)
:
mixedFixedValueSlipFvPatchVectorField
(
p
,
iF
),
TName_
(
"T"
),
rhoName_
(
"rho"
),
psiName_
(
"thermo:psi"
),
muName_
(
"thermo:mu"
),
tauMCName_
(
"tauMC"
),
accommodationCoeff_
(
1
.
0
),
Uwall_
(
p
.
size
(),
vector
(
0
.
0
,
0
.
0
,
0
.
0
)),
thermalCreep_
(
true
),
...
...
@@ -51,23 +51,28 @@ maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
{}
maxwellSlipUFvPatchVectorField
::
maxwellSlipUFvPatchVectorField
Foam
::
maxwellSlipUFvPatchVectorField
::
maxwellSlipUFvPatchVectorField
(
const
maxwellSlipUFvPatchVectorField
&
td
pvf
,
const
maxwellSlipUFvPatchVectorField
&
ms
pvf
,
const
fvPatch
&
p
,
const
DimensionedField
<
vector
,
volMesh
>&
iF
,
const
fvPatchFieldMapper
&
mapper
)
:
mixedFixedValueSlipFvPatchVectorField
(
tdpvf
,
p
,
iF
,
mapper
),
accommodationCoeff_
(
tdpvf
.
accommodationCoeff_
),
Uwall_
(
tdpvf
.
Uwall_
),
thermalCreep_
(
tdpvf
.
thermalCreep_
),
curvature_
(
tdpvf
.
curvature_
)
mixedFixedValueSlipFvPatchVectorField
(
mspvf
,
p
,
iF
,
mapper
),
TName_
(
mspvf
.
TName_
),
rhoName_
(
mspvf
.
rhoName_
),
psiName_
(
mspvf
.
psiName_
),
muName_
(
mspvf
.
muName_
),
tauMCName_
(
mspvf
.
tauMCName_
),
accommodationCoeff_
(
mspvf
.
accommodationCoeff_
),
Uwall_
(
mspvf
.
Uwall_
),
thermalCreep_
(
mspvf
.
thermalCreep_
),
curvature_
(
mspvf
.
curvature_
)
{}
maxwellSlipUFvPatchVectorField
::
maxwellSlipUFvPatchVectorField
Foam
::
maxwellSlipUFvPatchVectorField
::
maxwellSlipUFvPatchVectorField
(
const
fvPatch
&
p
,
const
DimensionedField
<
vector
,
volMesh
>&
iF
,
...
...
@@ -75,6 +80,11 @@ maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
)
:
mixedFixedValueSlipFvPatchVectorField
(
p
,
iF
),
TName_
(
dict
.
lookupOrDefault
<
word
>
(
"T"
,
"T"
)),
rhoName_
(
dict
.
lookupOrDefault
<
word
>
(
"rho"
,
"rho"
)),
psiName_
(
dict
.
lookupOrDefault
<
word
>
(
"psi"
,
"thermo:psi"
)),
muName_
(
dict
.
lookupOrDefault
<
word
>
(
"mu"
,
"thermo:mu"
)),
tauMCName_
(
dict
.
lookupOrDefault
<
word
>
(
"tauMC"
,
"tauMC"
)),
accommodationCoeff_
(
readScalar
(
dict
.
lookup
(
"accommodationCoeff"
))),
Uwall_
(
"Uwall"
,
dict
,
p
.
size
()),
thermalCreep_
(
dict
.
lookupOrDefault
(
"thermalCreep"
,
true
)),
...
...
@@ -88,9 +98,12 @@ maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
{
FatalIOErrorIn
(
"maxwellSlipUFvPatchScalarField::"
"maxwellSlipUFvPatchScalarField"
"(const fvPatch&, const scalarField&, const dictionary&)"
,
"maxwellSlipUFvPatchScalarField::maxwellSlipUFvPatchScalarField"
"("
"const fvPatch&, "
"const DimensionedField<vector, volMesh>&, "
"const dictionary&"
")"
,
dict
)
<<
"unphysical accommodationCoeff_ specified"
<<
"(0 < accommodationCoeff_ <= 1)"
<<
endl
...
...
@@ -119,23 +132,28 @@ maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
}
maxwellSlipUFvPatchVectorField
::
maxwellSlipUFvPatchVectorField
Foam
::
maxwellSlipUFvPatchVectorField
::
maxwellSlipUFvPatchVectorField
(
const
maxwellSlipUFvPatchVectorField
&
td
pvf
,
const
maxwellSlipUFvPatchVectorField
&
ms
pvf
,
const
DimensionedField
<
vector
,
volMesh
>&
iF
)
:
mixedFixedValueSlipFvPatchVectorField
(
tdpvf
,
iF
),
accommodationCoeff_
(
tdpvf
.
accommodationCoeff_
),
Uwall_
(
tdpvf
.
Uwall_
),
thermalCreep_
(
tdpvf
.
thermalCreep_
),
curvature_
(
tdpvf
.
curvature_
)
mixedFixedValueSlipFvPatchVectorField
(
mspvf
,
iF
),
TName_
(
mspvf
.
TName_
),
rhoName_
(
mspvf
.
rhoName_
),
psiName_
(
mspvf
.
psiName_
),
muName_
(
mspvf
.
muName_
),
tauMCName_
(
mspvf
.
tauMCName_
),
accommodationCoeff_
(
mspvf
.
accommodationCoeff_
),
Uwall_
(
mspvf
.
Uwall_
),
thermalCreep_
(
mspvf
.
thermalCreep_
),
curvature_
(
mspvf
.
curvature_
)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void
maxwellSlipUFvPatchVectorField
::
updateCoeffs
()
void
Foam
::
maxwellSlipUFvPatchVectorField
::
updateCoeffs
()
{
if
(
updated
())
{
...
...
@@ -143,11 +161,11 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
}
const
fvPatchScalarField
&
pmu
=
patch
().
lookupPatchField
<
volScalarField
,
scalar
>
(
"
mu
"
);
patch
().
lookupPatchField
<
volScalarField
,
scalar
>
(
mu
Name_
);
const
fvPatchScalarField
&
prho
=
patch
().
lookupPatchField
<
volScalarField
,
scalar
>
(
"
rho
"
);
patch
().
lookupPatchField
<
volScalarField
,
scalar
>
(
rho
Name_
);
const
fvPatchField
<
scalar
>&
ppsi
=
patch
().
lookupPatchField
<
volScalarField
,
scalar
>
(
"
psi
"
);
patch
().
lookupPatchField
<
volScalarField
,
scalar
>
(
psi
Name_
);
Field
<
scalar
>
C1
(
...
...
@@ -163,7 +181,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
if
(
thermalCreep_
)
{
const
volScalarField
&
vsfT
=
this
->
db
().
objectRegistry
::
lookupObject
<
volScalarField
>
(
"T"
);
this
->
db
().
objectRegistry
::
lookupObject
<
volScalarField
>
(
TName_
);
label
patchi
=
this
->
patch
().
index
();
const
fvPatchScalarField
&
pT
=
vsfT
.
boundaryField
()[
patchi
];
Field
<
vector
>
gradpT
(
fvc
::
grad
(
vsfT
)().
boundaryField
()[
patchi
]);
...
...
@@ -175,7 +193,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
if
(
curvature_
)
{
const
fvPatchTensorField
&
ptauMC
=
patch
().
lookupPatchField
<
volTensorField
,
tensor
>
(
"
tauMC
"
);
patch
().
lookupPatchField
<
volTensorField
,
tensor
>
(
tauMC
Name_
);
vectorField
n
(
patch
().
nf
());
refValue
()
-=
C1
/
prho
*
transform
(
I
-
n
*
n
,
(
n
&
ptauMC
));
...
...
@@ -185,9 +203,15 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
}
void
maxwellSlipUFvPatchVectorField
::
write
(
Ostream
&
os
)
const
void
Foam
::
maxwellSlipUFvPatchVectorField
::
write
(
Ostream
&
os
)
const
{
fvPatchVectorField
::
write
(
os
);
writeEntryIfDifferent
<
word
>
(
os
,
"T"
,
"T"
,
TName_
);
writeEntryIfDifferent
<
word
>
(
os
,
"rho"
,
"rho"
,
rhoName_
);
writeEntryIfDifferent
<
word
>
(
os
,
"psi"
,
"thermo:psi"
,
psiName_
);
writeEntryIfDifferent
<
word
>
(
os
,
"mu"
,
"thermo:mu"
,
muName_
);
writeEntryIfDifferent
<
word
>
(
os
,
"tauMC"
,
"tauMC"
,
tauMCName_
);
os
.
writeKeyword
(
"accommodationCoeff"
)
<<
accommodationCoeff_
<<
token
::
END_STATEMENT
<<
nl
;
Uwall_
.
writeEntry
(
"Uwall"
,
os
);
...
...
@@ -204,14 +228,13 @@ void maxwellSlipUFvPatchVectorField::write(Ostream& os) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField
(
fvPatchVectorField
,
maxwellSlipUFvPatchVectorField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
namespace
Foam
{
makePatchTypeField
(
fvPatchVectorField
,
maxwellSlipUFvPatchVectorField
);
}
// ************************************************************************* //
applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.H
View file @
365210a8
...
...
@@ -54,6 +54,21 @@ class maxwellSlipUFvPatchVectorField
{
// Private data
//- Temperature field name, default = "T"
word
TName_
;
//- Density field name, default = "rho"
word
rhoName_
;
//- Compressibility field name, default = "thermo:psi"
word
psiName_
;
//- Dynamic viscosity field name, default = "thermo:mu"
word
muName_
;
//- tauMC field name, default = "tauMC"
word
tauMCName_
;
// Accommodation coefficient
scalar
accommodationCoeff_
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment