Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dumux-repositories
dumux
Commits
c4ab1b32
Commit
c4ab1b32
authored
7 years ago
by
Katharina Heck
Committed by
Timo Koch
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[cleanup][material] update nonequilibrium fluidstate
parent
373e27de
No related branches found
No related tags found
2 merge requests
!666
Feature/mpnc on next
,
!617
[WIP] Next
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/material/fluidstates/nonequilibrium.hh
+31
-10
31 additions, 10 deletions
dumux/material/fluidstates/nonequilibrium.hh
with
31 additions
and
10 deletions
dumux/material/fluidstates/nonequilibrium.hh
+
31
−
10
View file @
c4ab1b32
...
@@ -23,8 +23,8 @@
...
@@ -23,8 +23,8 @@
* multi-phase, multi-component fluid system without using
* multi-phase, multi-component fluid system without using
* any assumptions.
* any assumptions.
*/
*/
#ifndef DUMUX_
GENERIC
_FLUID_STATE_HH
#ifndef DUMUX_
NONEQUILIBRIUM
_FLUID_STATE_HH
#define DUMUX_
GENERIC
_FLUID_STATE_HH
#define DUMUX_
NONEQUILIBRIUM
_FLUID_STATE_HH
#include
<cmath>
#include
<cmath>
#include
<algorithm>
#include
<algorithm>
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
namespace
Dumux
namespace
Dumux
{
{
/*!
/*!
* \ingroup FluidStates
* \ingroup FluidStates
* \brief Represents all relevant thermodynamic quantities of a
* \brief Represents all relevant thermodynamic quantities of a
...
@@ -45,8 +46,8 @@ template <class Scalar, class FluidSystem>
...
@@ -45,8 +46,8 @@ template <class Scalar, class FluidSystem>
class
NonEquilibriumFluidState
class
NonEquilibriumFluidState
{
{
public:
public:
enum
{
numPhases
=
FluidSystem
::
numPhases
}
;
static
constexpr
int
numPhases
=
FluidSystem
::
numPhases
;
enum
{
numComponents
=
FluidSystem
::
numComponents
}
;
static
constexpr
int
numComponents
=
FluidSystem
::
numComponents
;
NonEquilibriumFluidState
()
NonEquilibriumFluidState
()
{
{
...
@@ -116,7 +117,14 @@ public:
...
@@ -116,7 +117,14 @@ public:
* @copydoc Dumux::CompositionalFluidState::fugacity()
* @copydoc Dumux::CompositionalFluidState::fugacity()
*/
*/
Scalar
fugacity
(
int
phaseIdx
,
int
compIdx
)
const
Scalar
fugacity
(
int
phaseIdx
,
int
compIdx
)
const
{
return
pressure_
[
phaseIdx
]
*
fugacityCoefficient_
[
phaseIdx
][
compIdx
]
*
moleFraction_
[
phaseIdx
][
compIdx
];
}
{
return
pressure_
[
phaseIdx
]
*
fugacityCoefficient_
[
phaseIdx
][
compIdx
]
*
moleFraction_
[
phaseIdx
][
compIdx
];
}
Scalar
fugacity
(
int
compIdx
)
const
{
return
fugacity
(
0
,
compIdx
);
}
/*!
/*!
* @copydoc Dumux::CompositionalFluidState::molarVolume()
* @copydoc Dumux::CompositionalFluidState::molarVolume()
...
@@ -140,8 +148,16 @@ public:
...
@@ -140,8 +148,16 @@ public:
/*!
/*!
* @copydoc Dumux::CompositionalFluidState::temperature()
* @copydoc Dumux::CompositionalFluidState::temperature()
*/
*/
Scalar
temperature
(
int
phaseIdx
)
const
Scalar
temperature
(
const
int
phaseIdx
)
const
{
return
temperature_
[
phaseIdx
];
}
{
return
temperature_
[
phaseIdx
];
}
/*!
* \brief Get the equilibrium temperature \f$\mathrm{[K]}\f$ of the fluid phases.
*/
Scalar
temperature
()
const
{
return
temperatureEquil_
;
}
/*!
/*!
* @copydoc Dumux::CompositionalFluidState::pressure()
* @copydoc Dumux::CompositionalFluidState::pressure()
...
@@ -178,13 +194,17 @@ public:
...
@@ -178,13 +194,17 @@ public:
* \brief Set the temperature \f$\mathrm{[K]}\f$ of a fluid phase
* \brief Set the temperature \f$\mathrm{[K]}\f$ of a fluid phase
*/
*/
void
setTemperature
(
int
phaseIdx
,
Scalar
value
)
void
setTemperature
(
int
phaseIdx
,
Scalar
value
)
{
temperature_
[
phaseIdx
]
=
value
;
}
{
temperature_
[
phaseIdx
]
=
value
;
}
/*!
/*!
* \brief Set the temperature \f$\mathrm{[K]}\f$ of all fluid phases.
* \brief Set the temperature \f$\mathrm{[K]}\f$ of all fluid phases.
*/
*/
void
setTemperature
(
Scalar
value
)
void
setTemperature
(
Scalar
value
)
{
DUNE_THROW
(
Dune
::
NotImplemented
,
"This is a fluidstate for non-equilibrium, temperature in which phase?"
);}
{
temperatureEquil_
=
value
;
}
/*!
/*!
* \brief Set the fluid pressure of a phase \f$\mathrm{[Pa]}\f$
* \brief Set the fluid pressure of a phase \f$\mathrm{[Pa]}\f$
...
@@ -319,7 +339,8 @@ protected:
...
@@ -319,7 +339,8 @@ protected:
Scalar
density_
[
numPhases
];
Scalar
density_
[
numPhases
];
Scalar
enthalpy_
[
numPhases
];
Scalar
enthalpy_
[
numPhases
];
Scalar
viscosity_
[
numPhases
];
Scalar
viscosity_
[
numPhases
];
Scalar
temperature_
[
numPhases
];
Scalar
temperature_
[
numPhases
];
//
Scalar
temperatureEquil_
;
};
};
}
// end namespace Dumux
}
// end namespace Dumux
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment