Variable formulation error

Hi FF Community,

I have attempted to convert a gas flow problem into a varf formulation, but there seems to be an error that’s resulting in incorrect solutions. I’ve attached a screenshot of the varf statement along with the code.

Could you please take a look and let me know what might be wrong?

Thank you!


porepcheckpll.edp (3.2 KB)

In your varf for the right-hand side varf gasflow2 the two last lines need to te removed (they correspond to nothing in problem gasflow, which is your working reference if I understand well).
You need also to put the boundary conditions in gasflow2. This gives

varf gasflow2(pr, q) =
    int1d(Msh)(prold * idt * phi * q / (T * R))
  +on(1,pr=200000)
  +on(2,pr=100000);