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
d6f997b6
Commit
d6f997b6
authored
6 years ago
by
Dennis Gläser
Browse files
Options
Downloads
Patches
Plain Diff
[fluidsystems][2p1c] improve error message
parent
93bae5c6
No related branches found
No related tags found
1 merge request
!1140
Feature/2p1c wettability
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/material/fluidsystems/2p1c.hh
+24
-28
24 additions, 28 deletions
dumux/material/fluidsystems/2p1c.hh
with
24 additions
and
28 deletions
dumux/material/fluidsystems/2p1c.hh
+
24
−
28
View file @
d6f997b6
...
@@ -288,7 +288,7 @@ public:
...
@@ -288,7 +288,7 @@ public:
return
Component
::
gasDensity
(
temperature
,
pressure
);
return
Component
::
gasDensity
(
temperature
,
pressure
);
}
}
else
else
DUNE_THROW
(
Dune
::
NotImplemented
,
"wrong
index"
);
DUNE_THROW
(
Dune
::
InvalidStateException
,
"Invalid phase
index
.
"
);
}
}
using
Base
::
molarDensity
;
using
Base
::
molarDensity
;
...
@@ -308,8 +308,10 @@ public:
...
@@ -308,8 +308,10 @@ public:
Scalar
pressure
=
fluidState
.
temperature
(
phaseIdx
);
Scalar
pressure
=
fluidState
.
temperature
(
phaseIdx
);
if
(
phaseIdx
==
liquidPhaseIdx
)
if
(
phaseIdx
==
liquidPhaseIdx
)
return
Component
::
liquidMolarDensity
(
temperature
,
pressure
);
return
Component
::
liquidMolarDensity
(
temperature
,
pressure
);
else
if
(
phaseIdx
==
gasPhaseIdx
)
return
Component
::
gasMolarDensity
(
temperature
,
pressure
);
return
Component
::
gasMolarDensity
(
temperature
,
pressure
);
else
DUNE_THROW
(
Dune
::
InvalidStateException
,
"Invalid phase index."
);
}
}
/*!
/*!
...
@@ -330,15 +332,11 @@ public:
...
@@ -330,15 +332,11 @@ public:
// liquid phase
// liquid phase
if
(
phaseIdx
==
liquidPhaseIdx
)
if
(
phaseIdx
==
liquidPhaseIdx
)
{
return
Component
::
liquidViscosity
(
temperature
,
pressure
);
return
Component
::
liquidViscosity
(
temperature
,
pressure
);
}
else
if
(
phaseIdx
==
gasPhaseIdx
)
// gas phase
else
if
(
phaseIdx
==
gasPhaseIdx
)
// gas phase
{
return
Component
::
gasViscosity
(
temperature
,
pressure
);
return
Component
::
gasViscosity
(
temperature
,
pressure
);
}
else
else
DUNE_THROW
(
Dune
::
NotImplemented
,
"wrong
index"
);
DUNE_THROW
(
Dune
::
InvalidStateException
,
"Invalid phase
index
.
"
);
}
}
/*!
/*!
...
@@ -398,14 +396,15 @@ public:
...
@@ -398,14 +396,15 @@ public:
// liquid phase
// liquid phase
if
(
phaseIdx
==
liquidPhaseIdx
)
if
(
phaseIdx
==
liquidPhaseIdx
)
{
return
Component
::
vaporPressure
(
temperature
)
/
pressure
;
return
Component
::
vaporPressure
(
temperature
)
/
pressure
;
}
// for the gas phase, assume an ideal gas when it comes to
// for the gas phase, assume an ideal gas when it comes to
// fugacity (-> fugacity == partial pressure)
// fugacity (-> fugacity == partial pressure)
else
else
if
(
phaseIdx
==
gasPhaseIdx
)
return
1.0
;
return
1.0
;
else
DUNE_THROW
(
Dune
::
InvalidStateException
,
"Invalid phase index."
);
}
}
...
@@ -461,17 +460,15 @@ public:
...
@@ -461,17 +460,15 @@ public:
// liquid phase
// liquid phase
if
(
phaseIdx
==
liquidPhaseIdx
)
if
(
phaseIdx
==
liquidPhaseIdx
)
{
return
Component
::
liquidEnthalpy
(
fluidState
.
temperature
(
phaseIdx
),
return
Component
::
liquidEnthalpy
(
fluidState
.
temperature
(
phaseIdx
),
fluidState
.
pressure
(
phaseIdx
));
fluidState
.
pressure
(
phaseIdx
));
}
else
if
(
phaseIdx
==
gasPhaseIdx
)
// gas phase
else
if
(
phaseIdx
==
gasPhaseIdx
)
// gas phase
{
return
Component
::
gasEnthalpy
(
fluidState
.
temperature
(
phaseIdx
),
return
Component
::
gasEnthalpy
(
fluidState
.
temperature
(
phaseIdx
),
fluidState
.
pressure
(
phaseIdx
));
fluidState
.
pressure
(
phaseIdx
));
}
else
else
DUNE_THROW
(
Dune
::
NotImplemented
,
"wrong
index"
);
DUNE_THROW
(
Dune
::
InvalidStateException
,
"Invalid phase
index
.
"
);
}
}
/*!
/*!
...
@@ -489,17 +486,16 @@ public:
...
@@ -489,17 +486,16 @@ public:
{
{
assert
(
0
<=
phaseIdx
&&
phaseIdx
<
numPhases
);
assert
(
0
<=
phaseIdx
&&
phaseIdx
<
numPhases
);
// liquid phase
// liquid phase
if
(
phaseIdx
==
liquidPhaseIdx
)
{
if
(
phaseIdx
==
liquidPhaseIdx
)
return
Component
::
liquidThermalConductivity
(
fluidState
.
temperature
(
phaseIdx
),
return
Component
::
liquidThermalConductivity
(
fluidState
.
temperature
(
phaseIdx
),
fluidState
.
pressure
(
phaseIdx
));
//0.68 ;
fluidState
.
pressure
(
phaseIdx
));
//0.68 ;
}
else
if
(
phaseIdx
==
gasPhaseIdx
)
// gas phase
else
if
(
phaseIdx
==
gasPhaseIdx
)
// gas phase
{
return
Component
::
gasThermalConductivity
(
fluidState
.
temperature
(
phaseIdx
),
return
Component
::
gasThermalConductivity
(
fluidState
.
temperature
(
phaseIdx
),
fluidState
.
pressure
(
phaseIdx
));
//0.0248;
fluidState
.
pressure
(
phaseIdx
));
//0.0248;
}
else
else
DUNE_THROW
(
Dune
::
NotImplemented
,
"wrong
index"
);
DUNE_THROW
(
Dune
::
InvalidStateException
,
"Invalid phase
index
.
"
);
}
}
/*!
/*!
...
@@ -516,16 +512,16 @@ public:
...
@@ -516,16 +512,16 @@ public:
{
{
assert
(
0
<=
phaseIdx
&&
phaseIdx
<
numPhases
);
assert
(
0
<=
phaseIdx
&&
phaseIdx
<
numPhases
);
// liquid phase
// liquid phase
if
(
phaseIdx
==
liquidPhaseIdx
)
{
if
(
phaseIdx
==
liquidPhaseIdx
)
return
Component
::
liquidHeatCapacity
(
fluidState
.
temperature
(
phaseIdx
),
return
Component
::
liquidHeatCapacity
(
fluidState
.
temperature
(
phaseIdx
),
fluidState
.
pressure
(
phaseIdx
));
//4.217e3 ;
fluidState
.
pressure
(
phaseIdx
));
//4.217e3 ;
}
else
if
(
phaseIdx
==
gasPhaseIdx
)
// gas phase
else
if
(
phaseIdx
==
gasPhaseIdx
)
// gas phase
{
return
Component
::
gasHeatCapacity
(
fluidState
.
temperature
(
phaseIdx
),
return
Component
::
gasHeatCapacity
(
fluidState
.
temperature
(
phaseIdx
),
fluidState
.
pressure
(
phaseIdx
));
//2.029e3;
fluidState
.
pressure
(
phaseIdx
));
//2.029e3;
}
else
DUNE_THROW
(
Dune
::
NotImplemented
,
"wrong index"
);
else
DUNE_THROW
(
Dune
::
InvalidStateException
,
"Invalid phase index."
);
}
}
};
};
...
...
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