Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

PDE with algebraic equation

Please login with a confirmed email address before reporting spam

I am trying to implement mass concervation myself, but I do not understand how to do this correctly. To keep it simple at first, the density rho is constant

Mass conservation PDE:
d(rho)/dt + d(u*rho)/dt = 0
Algebraic equation
rho = 8 kg/m^3

Later I will try to couple this with Transport of diluted species, then the density rho will be changing since a difference is gas composition (molecular mass of the mixture changes due to different in composition)

Any help on how to implement the algebraic equation, I think I need to take the derivative somehow, but how do I do that neatly in Comsol?

3 Replies Last Post 29 mag 2015, 14:50 GMT-4
Sergei Yushanov Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 29 mag 2015, 11:05 GMT-4
Gilbert,

Did not check it by myself but you might try the following:

1. Define integration operator over the volume where you want impose constraint on density.
2. Use this integration operator to define variables “vol”, “m”, and “den”.
3. Add Global ODES and DAEs interface.
4. In Global Equations node, define variable name “u” and set equation f=den-8[kg/m^3]. This will impose constraint on density in volume.

Image for the above steps is attached.
Gilbert, Did not check it by myself but you might try the following: 1. Define integration operator over the volume where you want impose constraint on density. 2. Use this integration operator to define variables “vol”, “m”, and “den”. 3. Add Global ODES and DAEs interface. 4. In Global Equations node, define variable name “u” and set equation f=den-8[kg/m^3]. This will impose constraint on density in volume. Image for the above steps is attached.


Please login with a confirmed email address before reporting spam

Posted: 9 years ago 29 mag 2015, 14:36 GMT-4
Thanks so much for your detailed reply! I will look into on monday right away. Any change you could add the model you made, so I can check how you set up everything?
Thanks so much for your detailed reply! I will look into on monday right away. Any change you could add the model you made, so I can check how you set up everything?

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 29 mag 2015, 14:50 GMT-4
Does anyone know a good link which explains how to transform some PDE's, ODE's and algebraic equations in a set that COMSOL could solve? As in, how to organise them
Does anyone know a good link which explains how to transform some PDE's, ODE's and algebraic equations in a set that COMSOL could solve? As in, how to organise them

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.