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.

How to couple a cubic equation solution to a phase field fluid flow model?

Please login with a confirmed email address before reporting spam

Hello !

How to solve a cubic equation by using a previous pressure value comes from the fluid flow model and use the root solution as a new density value to feed back the next time step fluid flow calculation?

I follow an instruction from COMSOL Blog “Solving Algebraic Field Equations” and successfully use “ Domain ODE and DAE Interface (dode) ” to find out the density roots I want by using and artificial pressure input.
www.comsol.com/blogs/solving-algebraic-field-equations/

However, even though the blog describes an exactly same problem that I want to solve at the front, it only shows an example by using “dode” physics alone to solve a cubic equation without showing how to couple the solution to the actual flow model.

After I successfully solve the cubic equation by using“dode” to get the result I want. I try to add the same “dode” physics into my “Two-phase flow, phase field” model and set my fluid 1 density as this new dependent variable comes from “dode”. As for the pressure input, in the “dode” part, I use symbol “p” as the input argument of the cubic equation to represent the pressure field values.
The simulation does show a pressure change for the compressible gas bubble (fluid 1) but the density field I extract is remaining constant instead of changing along with the pressure value.

I guess I still need to modify the model tree in order to couple this two physics correctly. I would be very appreciated if anyone could help me figure this out. Thank you.

Di Shen

0 Replies Last Post 22.04.2016, 06:09 GMT-4
COMSOL Moderator

Hello Di Shen

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.