# CEL expression for calculating center of gravity (multi-phase flow)

 Register Blogs Members List Search Today's Posts Mark Forums Read

October 4, 2016, 08:54
CEL expression for calculating center of gravity (multi-phase flow)
#1
New Member

Qiong-yao Wang
Join Date: Apr 2014
Posts: 18
Rep Power: 12
Hello, everyone, I am now doing liquid sloshing in a closer tank with CFX. Multi-phase flow (air phase and water phase) is considered in my case. I want to obtain the time-history of the center of the gravity of liquid (water) during sloshing, using CEL expression. however, I don't know how to write the CEL expression. Could anyone help me? Thanks a lot.
Attached Images
 222555.png (21.9 KB, 38 views)

Last edited by hellowqy; October 12, 2016 at 06:52.

 October 4, 2016, 11:49 #2 Senior Member   Join Date: Jun 2009 Posts: 1,825 Rep Power: 33 Before you attempt to write the CEL expression, you must have the formulas of what you are trying to compute. In the case of the center of gravity, what do you think the formulas should be ? You can express them in mathematical terms, or plain English. Several here in the forum will be able help you to translate your formulas into CEL

October 12, 2016, 06:56
#3
New Member

Qiong-yao Wang
Join Date: Apr 2014
Posts: 18
Rep Power: 12
Quote:
 Originally Posted by Opaque Before you attempt to write the CEL expression, you must have the formulas of what you are trying to compute. In the case of the center of gravity, what do you think the formulas should be ? You can express them in mathematical terms, or plain English. Several here in the forum will be able help you to translate your formulas into CEL
Hello, Opaque.
Attached Images
 222555.png (21.9 KB, 25 views)

 October 12, 2016, 18:17 #4 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,746 Rep Power: 143 You can get total liquid volume from volumeInt(liquid.volume fraction)@domain. The sum over the mesh with a volume weighting is volumeInt(x*liquid.volume fraction)@domain I will leave it up to you from there

October 14, 2016, 02:53
#5
New Member

Qiong-yao Wang
Join Date: Apr 2014
Posts: 18
Rep Power: 12
Quote:
 Originally Posted by ghorrocks You can get total liquid volume from volumeInt(liquid.volume fraction)@domain. The sum over the mesh with a volume weighting is volumeInt(x*liquid.volume fraction)@domain I will leave it up to you from there
Hi, ghorrocks.
Thanks for your help. Well, volumeInt(liquid.volume fraction)@domain can be used to calculate the total liquid volume, while, this is something wrong with volumeInt(x*liquid.volume fraction)@domain. Since, in the fist, 'x' is a disallowed argument, so I used 'xGlobal' to substitute it. In the second, CFX give me a hint that only arguments that consist of a single recognised variable name are supported by the solver. In your expression, there are two variable names, which are 'x' and 'liquid.volume fraction' , respectively. So please help me to how to figure it out. Thanks a lot.

 October 15, 2016, 18:50 #6 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,746 Rep Power: 143 Define a variable of q = x*liquid.volume fraction. Then volumeInt(q)@domain should work.

 March 29, 2020, 08:55 #7 Member   Shahid Parvez Join Date: Jul 2009 Location: Pakistan Posts: 38 Rep Power: 16 Dear hellowqy Did you solve this problem? if yes, can you please share the details? I need it desperately. Can anyone else help?

 Tags center of gravity