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
c40faa99
Commit
c40faa99
authored
Nov 23, 2015
by
Henry Weller
Browse files
fixedMultiPhaseHeatFlux: Added optional relaxation
parent
346b31d9
Changes
4
Hide whitespace changes
Inline
Side-by-side
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C
View file @
c40faa99
...
...
@@ -83,10 +83,10 @@ alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::yPlusTherm
)
const
{
tmp
<
scalarField
>
typ
t
f
(
new
scalarField
(
this
->
size
()));
scalarField
&
yp
t
f
=
typ
t
f
();
tmp
<
scalarField
>
typ
s
f
(
new
scalarField
(
this
->
size
()));
scalarField
&
yp
s
f
=
typ
s
f
();
forAll
(
yp
t
f
,
faceI
)
forAll
(
yp
s
f
,
faceI
)
{
scalar
ypt
=
11
.
0
;
...
...
@@ -98,11 +98,11 @@ alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::yPlusTherm
if
(
yptNew
<
VSMALL
)
{
yp
t
f
[
faceI
]
=
0
;
yp
s
f
[
faceI
]
=
0
;
}
else
if
(
mag
(
yptNew
-
ypt
)
<
tolerance_
)
{
yp
t
f
[
faceI
]
=
yptNew
;
yp
s
f
[
faceI
]
=
yptNew
;
}
else
{
...
...
@@ -110,10 +110,10 @@ alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::yPlusTherm
}
}
yp
t
f
[
faceI
]
=
ypt
;
yp
s
f
[
faceI
]
=
ypt
;
}
return
typ
t
f
;
return
typ
s
f
;
}
...
...
@@ -160,52 +160,52 @@ alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
::
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
(
const
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
&
p
t
f
,
const
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
&
p
s
f
,
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
,
const
fvPatchFieldMapper
&
mapper
)
:
alphatPhaseChangeWallFunctionFvPatchScalarField
(
p
t
f
,
p
,
iF
,
mapper
),
Prt_
(
p
t
f
.
Prt_
),
Cmu_
(
p
t
f
.
Cmu_
),
kappa_
(
p
t
f
.
kappa_
),
E_
(
p
t
f
.
E_
),
dmdtRelax_
(
p
t
f
.
dmdtRelax_
),
fixedDmdt_
(
p
t
f
.
fixedDmdt_
)
alphatPhaseChangeWallFunctionFvPatchScalarField
(
p
s
f
,
p
,
iF
,
mapper
),
Prt_
(
p
s
f
.
Prt_
),
Cmu_
(
p
s
f
.
Cmu_
),
kappa_
(
p
s
f
.
kappa_
),
E_
(
p
s
f
.
E_
),
dmdtRelax_
(
p
s
f
.
dmdtRelax_
),
fixedDmdt_
(
p
s
f
.
fixedDmdt_
)
{}
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
::
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
(
const
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
&
awf
psf
const
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
&
psf
)
:
alphatPhaseChangeWallFunctionFvPatchScalarField
(
awf
psf
),
Prt_
(
awf
psf
.
Prt_
),
Cmu_
(
awf
psf
.
Cmu_
),
kappa_
(
awf
psf
.
kappa_
),
E_
(
awf
psf
.
E_
),
dmdtRelax_
(
awf
psf
.
dmdtRelax_
),
fixedDmdt_
(
awf
psf
.
fixedDmdt_
)
alphatPhaseChangeWallFunctionFvPatchScalarField
(
psf
),
Prt_
(
psf
.
Prt_
),
Cmu_
(
psf
.
Cmu_
),
kappa_
(
psf
.
kappa_
),
E_
(
psf
.
E_
),
dmdtRelax_
(
psf
.
dmdtRelax_
),
fixedDmdt_
(
psf
.
fixedDmdt_
)
{}
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
::
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
(
const
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
&
awf
psf
,
const
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
&
psf
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
)
:
alphatPhaseChangeWallFunctionFvPatchScalarField
(
awf
psf
,
iF
),
Prt_
(
awf
psf
.
Prt_
),
Cmu_
(
awf
psf
.
Cmu_
),
kappa_
(
awf
psf
.
kappa_
),
E_
(
awf
psf
.
E_
),
dmdtRelax_
(
awf
psf
.
dmdtRelax_
),
fixedDmdt_
(
awf
psf
.
fixedDmdt_
)
alphatPhaseChangeWallFunctionFvPatchScalarField
(
psf
,
iF
),
Prt_
(
psf
.
Prt_
),
Cmu_
(
psf
.
Cmu_
),
kappa_
(
psf
.
kappa_
),
E_
(
psf
.
E_
),
dmdtRelax_
(
psf
.
dmdtRelax_
),
fixedDmdt_
(
psf
.
fixedDmdt_
)
{}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.H
View file @
c40faa99
...
...
@@ -73,7 +73,7 @@ class alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
//- E coefficient
scalar
E_
;
//- dmdt relaxation
F
actor
//- dmdt relaxation
f
actor
scalar
dmdtRelax_
;
//- Reference dmdt
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C
View file @
c40faa99
...
...
@@ -44,7 +44,8 @@ fixedMultiPhaseHeatFluxFvPatchScalarField
)
:
fixedValueFvPatchScalarField
(
p
,
iF
),
q_
(
p
.
size
(),
0
.
0
)
q_
(
p
.
size
(),
0
.
0
),
relax_
(
1
.
0
)
{}
...
...
@@ -57,44 +58,48 @@ fixedMultiPhaseHeatFluxFvPatchScalarField
)
:
fixedValueFvPatchScalarField
(
p
,
iF
,
dict
),
q_
(
"q"
,
dict
,
p
.
size
())
q_
(
"q"
,
dict
,
p
.
size
()),
relax_
(
dict
.
lookupOrDefault
<
scalar
>
(
"relax"
,
1
.
0
))
{}
Foam
::
fixedMultiPhaseHeatFluxFvPatchScalarField
::
fixedMultiPhaseHeatFluxFvPatchScalarField
(
const
fixedMultiPhaseHeatFluxFvPatchScalarField
&
p
t
f
,
const
fixedMultiPhaseHeatFluxFvPatchScalarField
&
p
s
f
,
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
,
const
fvPatchFieldMapper
&
mapper
)
:
fixedValueFvPatchScalarField
(
ptf
,
p
,
iF
,
mapper
),
q_
(
ptf
.
q_
,
mapper
)
fixedValueFvPatchScalarField
(
psf
,
p
,
iF
,
mapper
),
q_
(
psf
.
q_
,
mapper
),
relax_
(
psf
.
relax_
)
{}
Foam
::
fixedMultiPhaseHeatFluxFvPatchScalarField
::
fixedMultiPhaseHeatFluxFvPatchScalarField
(
const
fixedMultiPhaseHeatFluxFvPatchScalarField
&
awf
psf
const
fixedMultiPhaseHeatFluxFvPatchScalarField
&
psf
)
:
fixedValueFvPatchScalarField
(
awfpsf
),
q_
(
awfpsf
.
q_
)
fixedValueFvPatchScalarField
(
psf
),
q_
(
psf
.
q_
),
relax_
(
psf
.
relax_
)
{}
Foam
::
fixedMultiPhaseHeatFluxFvPatchScalarField
::
fixedMultiPhaseHeatFluxFvPatchScalarField
(
const
fixedMultiPhaseHeatFluxFvPatchScalarField
&
awf
psf
,
const
fixedMultiPhaseHeatFluxFvPatchScalarField
&
psf
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
)
:
fixedValueFvPatchScalarField
(
awfpsf
,
iF
),
q_
(
awfpsf
.
q_
)
fixedValueFvPatchScalarField
(
psf
,
iF
),
q_
(
psf
.
q_
),
relax_
(
psf
.
relax_
)
{}
...
...
@@ -165,8 +170,7 @@ void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::updateCoeffs()
<<
gMin
(
Q
)
<<
" - "
<<
gMax
(
Q
)
<<
endl
;
}
scalar
relax
(
1
);
operator
==
((
1
-
relax
)
*
Tp
+
relax
*
(
q_
+
A
)
/
(
B
));
operator
==
((
1
-
relax_
)
*
Tp
+
relax_
*
(
q_
+
A
)
/
(
B
));
fixedValueFvPatchScalarField
::
updateCoeffs
();
}
...
...
@@ -175,6 +179,7 @@ void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::updateCoeffs()
void
Foam
::
fixedMultiPhaseHeatFluxFvPatchScalarField
::
write
(
Ostream
&
os
)
const
{
fvPatchField
<
scalar
>::
write
(
os
);
os
.
writeKeyword
(
"relax"
)
<<
relax_
<<
token
::
END_STATEMENT
<<
nl
;
q_
.
writeEntry
(
"q"
,
os
);
writeEntry
(
"value"
,
os
);
}
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.H
View file @
c40faa99
...
...
@@ -67,6 +67,9 @@ class fixedMultiPhaseHeatFluxFvPatchScalarField
//- Heat power [W] or flux [W/m2]
scalarField
q_
;
//- Relaxation factor
scalar
relax_
;
public:
...
...
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