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
5d1dbf06
Commit
5d1dbf06
authored
8 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[liquid2c] Add molar density. Remove compIdx default.
parent
32093b15
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!617
[WIP] Next
,
!360
Improve Richards model - Add RichardsNC model
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/material/fluidsystems/liquidphase2c.hh
+13
-5
13 additions, 5 deletions
dumux/material/fluidsystems/liquidphase2c.hh
with
13 additions
and
5 deletions
dumux/material/fluidsystems/liquidphase2c.hh
+
13
−
5
View file @
5d1dbf06
...
@@ -82,7 +82,7 @@ public:
...
@@ -82,7 +82,7 @@ public:
*
*
* \param compIdx The index of the component to consider
* \param compIdx The index of the component to consider
*/
*/
static
std
::
string
componentName
(
int
compIdx
=
0
)
static
std
::
string
componentName
(
int
compIdx
)
{
return
compIdx
?
SecondComponent
::
name
()
:
MainComponent
::
name
();
}
{
return
compIdx
?
SecondComponent
::
name
()
:
MainComponent
::
name
();
}
/*!
/*!
...
@@ -129,7 +129,7 @@ public:
...
@@ -129,7 +129,7 @@ public:
/*!
/*!
* \brief The mass in \f$\mathrm{[kg]}\f$ of one mole of the component.
* \brief The mass in \f$\mathrm{[kg]}\f$ of one mole of the component.
*/
*/
static
Scalar
molarMass
(
int
compIdx
=
0
)
static
Scalar
molarMass
(
int
compIdx
)
{
return
compIdx
?
SecondComponent
::
molarMass
()
:
MainComponent
::
molarMass
();
}
{
return
compIdx
?
SecondComponent
::
molarMass
()
:
MainComponent
::
molarMass
();
}
/*!
/*!
...
@@ -164,18 +164,18 @@ public:
...
@@ -164,18 +164,18 @@ public:
{
return
MainComponent
::
vaporPressure
(
T
);
}
{
return
MainComponent
::
vaporPressure
(
T
);
}
/*!
/*!
* \brief The density \f$\mathrm{[kg/m^3]}\f$ of the
component
at a given pressure and temperature.
* \brief The density \f$\mathrm{[kg/m^3]}\f$ of the
phase
at a given pressure and temperature.
*/
*/
static
Scalar
density
(
Scalar
temperature
,
Scalar
pressure
)
static
Scalar
density
(
Scalar
temperature
,
Scalar
pressure
)
{
return
MainComponent
::
liquidDensity
(
temperature
,
pressure
);
}
{
return
MainComponent
::
liquidDensity
(
temperature
,
pressure
);
}
using
Base
::
density
;
using
Base
::
density
;
/*!
/*!
* \brief The density \f$\mathrm{[kg/m^3]}\f$ of the
component
at a given pressure and temperature.
* \brief The density \f$\mathrm{[kg/m^3]}\f$ of the
phase
at a given pressure and temperature.
*/
*/
template
<
class
FluidState
>
template
<
class
FluidState
>
static
Scalar
density
(
const
FluidState
&
fluidState
,
static
Scalar
density
(
const
FluidState
&
fluidState
,
const
int
phaseIdx
)
const
int
phaseIdx
=
0
)
{
{
const
Scalar
T
=
fluidState
.
temperature
(
phaseIdx
);
const
Scalar
T
=
fluidState
.
temperature
(
phaseIdx
);
const
Scalar
p
=
fluidState
.
pressure
(
phaseIdx
);
const
Scalar
p
=
fluidState
.
pressure
(
phaseIdx
);
...
@@ -191,6 +191,14 @@ public:
...
@@ -191,6 +191,14 @@ public:
+
SecondComponent
::
molarMass
()
*
fluidState
.
moleFraction
(
wPhaseIdx
,
secondCompIdx
));
+
SecondComponent
::
molarMass
()
*
fluidState
.
moleFraction
(
wPhaseIdx
,
secondCompIdx
));
}
}
/*!
* \brief The molar density \f$\mathrm{[mol/m^3]}\f$ of the phase at a given pressure and temperature.
*/
template
<
class
FluidState
>
static
Scalar
molarDensity
(
const
FluidState
&
fluidState
,
const
int
phaseIdx
=
0
)
{
return
fluidState
.
molarDensity
(
phaseIdx
);
}
/*!
/*!
* \brief The pressure \f$\mathrm{[Pa]}\f$ of the component at a given density and temperature.
* \brief The pressure \f$\mathrm{[Pa]}\f$ of the component at a given density and temperature.
*/
*/
...
...
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