Added posibility to use eclipse fluid for 1D case. Corrected bug in guess for newton solver

This commit is contained in:
Halvor M. Nilsen
2012-07-03 11:05:51 +02:00
parent 07f5c353e0
commit 497822b893
2 changed files with 45 additions and 28 deletions

View File

@@ -959,7 +959,8 @@ namespace Opm
fractionalflow_[cell] = ff;
mc_[cell] = mc;
return;
}else{
}else{
//*
x[0] = saturation_[cell]-res[0];
if((x[0]>1) || (x[0]<0)){
x[0] = 0.5;
@@ -968,12 +969,18 @@ namespace Opm
if(x[0]>0){
x[1] = concentration_[cell]*saturation_[cell]-res[1];
x[1] = x[1]/x[0];
if(x[1]> polyprops_.cMax()){
x[1]= polyprops_.cMax()/2.0;
}
if(x[1]<0){
x[1]=0;
}
}else{
x[1]=0;
}
//x[0]=0.5;x[1]=polyprops_.cMax()/2.0;
res_eq.computeResidual(x, res, mc, ff);
//*/
}