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 insert hard differential equations (containing two variables) in COMSOL 5.2a

Please login with a confirmed email address before reporting spam

Hi Everyone,

I attempt to program new physics in my two-phase flow + phase field model. I search since several days how to inserts my partial equations in COMSOL 5.2a.
The concentrated form of my dimensionless equation is:

1- d(xi*F)/dt+Nabla(xi*F*u)=(1/Pe)*Nabla(xi*Nabla(F))-h*delta*J(F,f)
2- d(delta*F)/dt+Nabla(delta*F*u)=(1/pe)*Nabla(delta*Nabla(F))+h*J(F,f)
Where :
u is velocity so dependent variable of Laminar two phase flow
xi=1-c WITH c is an dependent variable of another physic (phase field)
delta=(3*sqrt(2)/a)*c^2*(1-c)^2
J(F,f)= Bi*(k*F*((1-l*c)/l)-f)
Bi is "0" when xi=1 and "1" when xi=0. Bi can take 0 and 1 only
k,h,pe,Pe and l are all constant.

when I try to do differentiation by part, I get:

1- xi*dF/dt + F*dxi/dt + F*u*Nabla(xi) + xi*Nabla(F*u) – (xi/Pe)*Nabla(Nabla F) - (1/Pe)*Nabla F * Nabla (xi) = – h*delta*J
2- delta*dF/dt + F*d(delta)/dt + F*u*Nabla(delta) + delta*Nabla(F*u) – (delta/pe)*Nabla(Nabla F) - (1/Pe)*Nabla F * Nabla(delta) = h*J

Dividing eq.1 by x1 and eq.2 by delta, I get:

1- dF/dt + Nabla(F*u) – (1/Pe)*Nabla(Nabla F) + F*a + beta* Nabla F = FRIGHT
where
a = (1/xi)*dxi/dt + (1/xi)*u*Nabla(xi)
beta = (1/xi)*(1/Pe)*Nabla xi
FRIGHT= – (1/xi)*h*delta*J

2- df/dt + Nabla(f*u) – (1/Pe)*Nabla(Nabla f) + f*b + gama* Nabla f = fRIGHT
where
b = (1/delta)*d(delta)/dt + (1/delta)*u*Nabla(delta)
gama = (1/delta)*(1/pe)*Nabla(delta)
fRIGHT= (1/delta)*h*J

Is it correct ?
how to translate in COMSOL 5.2 language ?
And finally, In what option, insert these equations which govern my additional physics ?

Thanks for your response.

3 Replies Last Post 20 mar 2017, 12:49 GMT-4
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 20 mar 2017, 04:23 GMT-4
Hi Marc,

With this number of complicated equations, I think that the chances that you get an answer will be much better if you write the equations in LaTeX form, as described in www.comsol.com/community/forums/general/thread/33025

Regards,
Henrik
Hi Marc, With this number of complicated equations, I think that the chances that you get an answer will be much better if you write the equations in LaTeX form, as described in https://www.comsol.com/community/forums/general/thread/33025 Regards, Henrik

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 20 mar 2017, 12:13 GMT-4
Thank a lot Henrik,

However, I didn't find "Equation Display" in ma COMSOL version.
I have COMSOL 5.2a Updated 3 for iOS (Macbook).

How can I find I ? Because LateX is located in "Equation Display" accordind to comsol's help.

Marc Felix
Thank a lot Henrik, However, I didn't find "Equation Display" in ma COMSOL version. I have COMSOL 5.2a Updated 3 for iOS (Macbook). How can I find I ? Because LateX is located in "Equation Display" accordind to comsol's help. Marc Felix

Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 20 mar 2017, 12:49 GMT-4
Hi Marc,

You got me wrong there. I was talking about formatting your question in a way that is more appealing to your fellow forum users. I am sure that the chance that someone actually cares to read all of it is better if it starts something like

1 :

Regards,
Henrik
Hi Marc, You got me wrong there. I was talking about formatting your question in a way that is more appealing to your fellow forum users. I am sure that the chance that someone actually cares to read all of it is better if it starts something like 1 : [math] \frac{\partial (\xi F)}{\partial t} + \nabla (\xi F \mathbf u) =[/math] Regards, Henrik

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.