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
Posted 20 mar 2017, 03:42 GMT-4 Materials, Modeling Tools & Definitions, Parameters, Variables, & Functions Version 5.2a 3 Replies
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.
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