# PDESystem & MOL

I’m trying to formulate a PDE system for solution via MethodOfLines.jl. In the last step, I need to use the `PDESystem` constructor. It is not clear to me what the arguments of that function need to be. Here is what I have done, and which is accepted:

``````@named gas_lift = PDESystem(eqs,bcs,doms,[t,x],[p(t,x),ṁ_ℓf, ṁ_a2t, ṁ_t2p])
``````

However, I get an error message when I run the `discretize` function.

Question:

1. What is required of the 5th argument, the `dvs` – dependent variables; `[p(t,x),ṁ_ℓf, ṁ_a2t, ṁ_t2p]` in the example above? Do I list those that I want to find the values of, or the entire list?
2. In my case, I have a large number of variables in `(t,x)` and a large number of variables in `t`. I have 3 PDEs, a number of algebraic equations within the volume, and a number of algebraic equations in the BCs. I have already used the `@variables` macro of MTK to specify variables. Do I need to repeat all variables here?

The whole list.

Yes, though you can just slap that array down if you define the variables in an array.

1 Like

I had defined variables in an array…

``````vars = @variables begin
# Distributed variables
m̌_ℓ(..),            [description = "Liquid bulk density, kg/m^3"]
ṁ_ℓ(..),            [description = "Liquid mass flow rate, kg/s"]
m̌_g(..),            [description = "Gas bulk density, kg/m^3"]
ṁ_g(..),            [description = "Gas mass flow rate, kg/s"]
...
# Temporal variables
ṁ_ℓf(t),            [description = "Liquid mass flow rate from reservoir formation, kg/s"]
p_f(t),             [description = "Reservoir formation pressure, Pa"]
``````

However, I assume the `dvs` needs to be in the following form:

``````dvs = [m̌_ℓ(t,x), ṁ_ℓ(t,x), m̌_g(t,x), ... ṁ_g(t,x), ...ṁ_ℓf, p_f, ...]
``````

In any way, creating the `PDESystem(...)` seems to work, i.e., does not give an error message.