Skip to content
Snippets Groups Projects
Commit 30448d6e authored by Philipp Nuske's avatar Philipp Nuske
Browse files

The "standard implicit" way of determining phase compositions is by means of...

The "standard implicit" way of determining phase compositions is by means of the MiscibleMultiPhaseComposition constraint solver. 
The constraints are written into a matrix and the matrix is solved. 
However, if it cannot be solved an exception is thrown. 
This commit catches that exception, and throws NumericalProblem so the simulation can try and continue. 
- Reviewed by Bernd


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10030 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 4558eef6
No related branches found
No related tags found
No related merge requests found
......@@ -162,7 +162,19 @@ public:
}
// solve for all mole fractions
M.solve(x, b);
try
{
M.solve(x, b);
}
catch (Dune::FMatrixError & e) {
DUNE_THROW(NumericalProblem,
"Matrix for composition of phases could not be solved. \n"
"Throwing NumericalProblem for trying with smaller timestep.");
}
catch (...) {
std::cerr << "Unknown exception thrown!\n";
exit(1);
}
// set all mole fractions and the the additional quantities in
// the fluid state
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment