Dear Kenza,

regarding your first question: Right now we only implemented the 2p2c 
non-equilibrium model for both phases present as only then you can have the 
interaction between the two phases that are in non-equilibrium. If one phase 
would vanish, that would mean you'll need a phase switch criterion and then 
solve only a standard 1p2c equation.


You should also get an error stating that when you set the phase state to one 
phase only.


To your second question: I am not sure, why you set the boundary condition for 
the components CH4 in liquid and H2O in the gas phase? You wrote that you want 
the gas phase to leave the domain? Then you could solve that with a dirichlet 
condition for the gas phase as probably you know the gas pressure at the domain 
boundary?


I hope this helps.


Best wishes,

Katharina


________________________________
Von: DuMux <dumux-boun...@listserv.uni-stuttgart.de> im Auftrag von kenza 
bouznari <bouznari.ke...@gmail.com>
Gesendet: Dienstag, 24. August 2021 00:31
An: dumux@listserv.uni-stuttgart.de
Betreff: [DuMux] Outflow BC

Hello,

I'm using the 2p2c/chemicalnonequilibrium model (dumux3.3) to simulate a gas 
injection (point source) inside a fully saturated sand cell. I have the 
following questions:

  1.  Why is it not possible to have only one phase (water) at the initial 
condition and before injecting the gas (at t=0, we can't have Sn=0 & Sw=0.999)?
  2.  I need to let the gas come out of the top and right boundaries. For that, 
I tried an Outflow boundary condition but the gas still stacks at the top 
boundary. How can I fix that as well?

PS: the water flow direction is from left to right (Dirichlet for the right and 
left boundaries & Neumann=noflow for the top and bottom boundaries)
Here are the BCs I am currently using :
    BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
 {
        BoundaryTypes bcTypes;
        bcTypes.setAllNeumann();
 if(globalPos[0] > this->gridGeometry().bBoxMax()[0] - eps_ || globalPos[0] < 
this->gridGeometry().bBoxMin()[0] + eps_)
  {
       bcTypes.setAllDirichlet();
       bcTypes.setOutflow(2);
       bcTypes.setOutflow(3);
  }
else if (globalPos[1] < this->gridGeometry().bBoxMin()[1] + eps_) // dans le 
cas 2D globalPos(1)
{
      bcTypes.setOutflow(2);
      bcTypes.setOutflow(3);
}
      return bcTypes;
 }

and for the Initial & Dirichlet functions, I'm using :
    // the internal method for the initial condition
    PrimaryVariables initial_(const GlobalPosition &globalPos) const
    {
        PrimaryVariables values(0.0);
        const Scalar densityW = 1000.0;
        values[Indices::pressureIdx] = 101300.0 + 
(this->gridGeometry().bBoxMax()[1] - globalPos[1])*densityW*9.81;//1e5; // 
water pressure
        if (globalPos[0] < this->gridGeometry().bBoxMin()[0] + eps_)
   {
   values[Indices::pressureIdx] = 100 + 101300.0 + 
(this->gridGeometry().bBoxMax()[1] - globalPos[1])*densityW*9.81;
   }
   values[Indices::switchIdx] = 0.05; // gas saturation = 0.05 since I can't 
put Sn=0!!
   values[2] = 1e-5; // xCH4_liq
   values[3] = 1e-3; // xH2O_gas

        values[Indices::temperatureIdx] = temperature_;
        values.setState(Indices::bothPhases);
        return values;
    }

Thanks a lot for your help,

Kenza

_______________________________________________
DuMux mailing list
DuMux@listserv.uni-stuttgart.de
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to