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
13b14177
Commit
13b14177
authored
Dec 10, 2021
by
sergio
Committed by
Andrew Heather
Dec 15, 2021
Browse files
ENH: Adding new access to basic thermo for rho and Cp
parent
b18dd0cb
Changes
8
Hide whitespace changes
Inline
Side-by-side
applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H
View file @
13b14177
...
...
@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2017 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -203,6 +204,18 @@ public:
const
label
patchi
)
const
;
//- Heat capacity using pressure and temperature
virtual
tmp
<
scalarField
>
CpThermo
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
{
NotImplemented
;
return
tmp
<
scalarField
>::
New
(
p
);
}
//- Heat capacity at constant volume [J/kg/K]
virtual
tmp
<
volScalarField
>
Cv
()
const
;
...
...
@@ -214,6 +227,18 @@ public:
const
label
patchi
)
const
;
//- Density from pressure and temperature
virtual
tmp
<
scalarField
>
rhoEoS
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
{
NotImplemented
;
return
tmp
<
scalarField
>::
New
(
p
);
}
//- Gamma = Cp/Cv []
virtual
tmp
<
volScalarField
>
gamma
()
const
;
...
...
applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H
View file @
13b14177
...
...
@@ -318,6 +318,18 @@ public:
const
label
patchi
)
const
;
//- Heat capacity using pressure and temperature
virtual
tmp
<
scalarField
>
CpThermo
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
{
NotImplemented
;
return
tmp
<
scalarField
>::
New
(
p
);
}
//- Heat capacity at constant volume [J/kg/K]
virtual
tmp
<
volScalarField
>
Cv
()
const
;
...
...
@@ -329,6 +341,18 @@ public:
const
label
patchi
)
const
;
//- Density from pressure and temperature
virtual
tmp
<
scalarField
>
rhoEoS
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
{
NotImplemented
;
return
tmp
<
scalarField
>::
New
(
p
);
}
//- Gamma = Cp/Cv []
virtual
tmp
<
volScalarField
>
gamma
()
const
;
...
...
applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.H
View file @
13b14177
...
...
@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2016-202
0
OpenCFD Ltd.
Copyright (C) 2016-202
1
OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -173,6 +173,18 @@ public:
const
label
patchi
)
const
;
//- Heat capacity using pressure and temperature
virtual
tmp
<
scalarField
>
CpThermo
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
{
NotImplemented
;
return
tmp
<
scalarField
>::
New
(
p
);
}
//- Return Cv of the mixture
virtual
tmp
<
volScalarField
>
Cv
()
const
;
...
...
@@ -184,6 +196,18 @@ public:
const
label
patchI
)
const
;
//- Density from pressure and temperature
virtual
tmp
<
scalarField
>
rhoEoS
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
{
NotImplemented
;
return
tmp
<
scalarField
>::
New
(
p
);
}
//- Gamma = Cp/Cv []
virtual
tmp
<
volScalarField
>
gamma
()
const
;
...
...
src/phaseSystemModels/multiphaseInter/phasesSystem/phaseSystem/phaseSystem.C
View file @
13b14177
...
...
@@ -455,6 +455,18 @@ Foam::tmp<Foam::scalarField> Foam::phaseSystem::Cp
}
Foam
::
tmp
<
Foam
::
scalarField
>
Foam
::
phaseSystem
::
CpThermo
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
{
NotImplemented
;
return
nullptr
;
}
Foam
::
tmp
<
Foam
::
volScalarField
>
Foam
::
phaseSystem
::
Cv
()
const
{
auto
iter
=
phaseModels_
.
cbegin
();
...
...
@@ -496,6 +508,18 @@ Foam::tmp<Foam::scalarField> Foam::phaseSystem::Cv
}
Foam
::
tmp
<
Foam
::
scalarField
>
Foam
::
phaseSystem
::
rhoEoS
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
{
NotImplemented
;
return
nullptr
;
}
Foam
::
tmp
<
Foam
::
volScalarField
>
Foam
::
phaseSystem
::
gamma
()
const
{
auto
iter
=
phaseModels_
.
cbegin
();
...
...
src/phaseSystemModels/multiphaseInter/phasesSystem/phaseSystem/phaseSystem.H
View file @
13b14177
...
...
@@ -351,6 +351,14 @@ public:
const
label
patchi
)
const
;
//- Heat capacity using pressure and temperature
virtual
tmp
<
scalarField
>
CpThermo
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
;
//- Return Cv of the mixture
virtual
tmp
<
volScalarField
>
Cv
()
const
;
...
...
@@ -362,6 +370,14 @@ public:
const
label
patchI
)
const
;
//- Density from pressure and temperature
virtual
tmp
<
scalarField
>
rhoEoS
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
;
//- Gamma = Cp/Cv []
virtual
tmp
<
volScalarField
>
gamma
()
const
;
...
...
src/thermophysicalModels/basic/basicThermo/basicThermo.H
View file @
13b14177
...
...
@@ -443,6 +443,14 @@ public:
const
label
patchi
)
const
=
0
;
//- Heat capacity using pressure and temperature
virtual
tmp
<
scalarField
>
CpThermo
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
=
0
;
//- Heat capacity at constant volume [J/kg/K]
virtual
tmp
<
volScalarField
>
Cv
()
const
=
0
;
...
...
@@ -454,6 +462,14 @@ public:
const
label
patchi
)
const
=
0
;
//- Density from pressure and temperature
virtual
tmp
<
scalarField
>
rhoEoS
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
=
0
;
//- Gamma = Cp/Cv []
virtual
tmp
<
volScalarField
>
gamma
()
const
=
0
;
...
...
src/thermophysicalModels/basic/heThermo/heThermo.C
View file @
13b14177
...
...
@@ -376,6 +376,28 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::Cp
}
template
<
class
BasicThermo
,
class
MixtureType
>
Foam
::
tmp
<
Foam
::
scalarField
>
Foam
::
heThermo
<
BasicThermo
,
MixtureType
>::
CpThermo
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
{
auto
tCp
=
tmp
<
scalarField
>::
New
(
T
.
size
());
auto
&
Cp
=
tCp
.
ref
();
forAll
(
cells
,
i
)
{
const
label
celli
=
cells
[
i
];
Cp
[
i
]
=
this
->
cellMixture
(
celli
).
Cp
(
p
[
i
],
T
[
i
]);
}
return
tCp
;
}
template
<
class
BasicThermo
,
class
MixtureType
>
Foam
::
tmp
<
Foam
::
volScalarField
>
Foam
::
heThermo
<
BasicThermo
,
MixtureType
>::
Cp
()
const
...
...
@@ -449,6 +471,28 @@ Foam::heThermo<BasicThermo, MixtureType>::Cv
}
template
<
class
BasicThermo
,
class
MixtureType
>
Foam
::
tmp
<
Foam
::
scalarField
>
Foam
::
heThermo
<
BasicThermo
,
MixtureType
>::
rhoEoS
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
{
auto
tRho
=
tmp
<
scalarField
>::
New
(
T
.
size
());
auto
&
rho
=
tRho
.
ref
();
forAll
(
cells
,
i
)
{
const
label
celli
=
cells
[
i
];
rho
[
i
]
=
this
->
cellMixture
(
celli
).
rho
(
p
[
i
],
T
[
i
]);
}
return
tRho
;
}
template
<
class
BasicThermo
,
class
MixtureType
>
Foam
::
tmp
<
Foam
::
volScalarField
>
Foam
::
heThermo
<
BasicThermo
,
MixtureType
>::
Cv
()
const
...
...
src/thermophysicalModels/basic/heThermo/heThermo.H
View file @
13b14177
...
...
@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2015-201
7
OpenCFD Ltd.
Copyright (C) 2015-20
2
1 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -228,6 +228,14 @@ public:
const
label
patchi
)
const
;
//- Heat capacity using pressure and temperature
virtual
tmp
<
scalarField
>
CpThermo
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
;
//- Heat capacity at constant pressure [J/kg/K]
virtual
tmp
<
volScalarField
>
Cp
()
const
;
...
...
@@ -239,6 +247,14 @@ public:
const
label
patchi
)
const
;
//- Density from pressure and temperature
virtual
tmp
<
scalarField
>
rhoEoS
(
const
scalarField
&
T
,
const
scalarField
&
p
,
const
labelList
&
cells
)
const
;
//- Heat capacity at constant volume [J/kg/K]
virtual
tmp
<
volScalarField
>
Cv
()
const
;
...
...
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