CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

in CFX, how to define a inlet condition of feedback control flow rate ?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2009, 01:23
Default in CFX, how to define a inlet condition of feedback control flow rate ?
  #1
New Member
 
henry wang
Join Date: May 2009
Posts: 13
Rep Power: 16
suihenry is on a distinguished road
Hi, guys. i have a big problem in my simulation to analysis the fluid flow passing a check valve. i want to define a feedback control inlet condition of mass flow. At the end of each tStep, if the force caused by fluid flow is bigger than the spring force, the mass rate should be reduced; if the force caused by fluid flow is lower than the spring force, the mass rate should be increased. But how to do it? should i use the function of program like VB or C language? if so, are there some cases to study? Please help me. Thank you.


Last edited by suihenry; May 13, 2009 at 01:33. Reason: i want the problem to be described more clearly
suihenry is offline   Reply With Quote

Old   May 13, 2009, 08:08
Default
  #2
New Member
 
liuzhe
Join Date: May 2009
Posts: 3
Rep Power: 16
liuzhe1213 is on a distinguished road
i think you can use User Fortran in CFX, it is easy to realize
liuzhe1213 is offline   Reply With Quote

Old   May 13, 2009, 08:30
Default
  #3
New Member
 
Join Date: Apr 2009
Posts: 14
Rep Power: 17
longbow is on a distinguished road
This can be easily done with CCL. First define an expression like this:
inletMass=massFlow@(inlet)+coef*(spring force - force_z@(check valve))

Then, use it to define your inlet boundary condition. Here I assume check valve force is along z-axis. You probably want to try several "coef" values to make above expression working. Please make sure "coef" have correct unit.
longbow is offline   Reply With Quote

Old   May 13, 2009, 21:50
Default
  #4
New Member
 
henry wang
Join Date: May 2009
Posts: 13
Rep Power: 16
suihenry is on a distinguished road
Quote:
Originally Posted by longbow View Post
This can be easily done with CCL. First define an expression like this:
inletMass=massFlow@(inlet)+coef*(spring force - force_z@(check valve))

Then, use it to define your inlet boundary condition. Here I assume check valve force is along z-axis. You probably want to try several "coef" values to make above expression working. Please make sure "coef" have correct unit.
Thank you! it's a good idea. But if use the user fortran, maybe the results is more accurate and the convergence can be achieved quickly.
suihenry is offline   Reply With Quote

Old   May 13, 2009, 21:51
Default
  #5
New Member
 
henry wang
Join Date: May 2009
Posts: 13
Rep Power: 16
suihenry is on a distinguished road
Quote:
Originally Posted by liuzhe1213 View Post
i think you can use User Fortran in CFX, it is easy to realize
Do you have some cases to study the user fortran in CFX?
suihenry is offline   Reply With Quote

Old   May 14, 2009, 04:00
Default
  #6
Rui
Member
 
Rui's Avatar
 
Rui Igreja
Join Date: Mar 2009
Location: Aveiro
Posts: 68
Blog Entries: 1
Rep Power: 17
Rui is on a distinguished road
Quote:
Originally Posted by suihenry View Post
... if use the user fortran, maybe the results is more accurate and the convergence can be achieved quickly.
Why?
__________________
Rui
Rui is offline   Reply With Quote

Old   May 14, 2009, 04:42
Default
  #7
New Member
 
henry wang
Join Date: May 2009
Posts: 13
Rep Power: 16
suihenry is on a distinguished road
Quote:
Originally Posted by Rui View Post
Why?
To make the total force of disc zero (balance of force caused by fluid flow and spring force), using CEL expression need to give a initial flow rate, and we don't know this initial flowrate, we just try to value it but may very inaccurate, and the coefficient in the CEL expression is difficult to determine. we need to try man\ybe many times to get the right coefficient, this cost a lot of times.
But if use the user fortran, the above problems can be greatly improved. At each timestep, the inlet flow rate can be calculated by the computer, and it's more accurate and quickly approach the banlance value.
suihenry is offline   Reply With Quote

Old   May 14, 2009, 04:49
Default
  #8
Rui
Member
 
Rui's Avatar
 
Rui Igreja
Join Date: Mar 2009
Location: Aveiro
Posts: 68
Blog Entries: 1
Rep Power: 17
Rui is on a distinguished road
And if you do it via Fortran, what can you do?
You also need an initial flowrate, and some kind of coefficient, right?
__________________
Rui
Rui is offline   Reply With Quote

Old   May 14, 2009, 08:16
Default
  #9
New Member
 
Join Date: Apr 2009
Posts: 14
Rep Power: 17
longbow is on a distinguished road
massFlow@(Inlet) calculates flow rate at each timestep too. As Rui pointed out, you also need to define an initial flow rate. I don't know why you think using user fortran is better than CEL. As a matter of fact, CFX actually wants customer to stay away from user fortran. They are enhancing CEL's capability to accomplish what previously has to be done by user fortran. The stuff you want to do can be done by CEL easily without sacrificing accuracy.
longbow is offline   Reply With Quote

Old   May 14, 2009, 08:26
Default
  #10
New Member
 
henry wang
Join Date: May 2009
Posts: 13
Rep Power: 16
suihenry is on a distinguished road
You two mean that using user fortran also need a initial flowrate and a coefficient? i have no idea about user fortran since i never use it, i just heared that it's more convenient than CEL. And one had told me that in my case, i can use user fortran to replace the CEL. this method can reduce the times of trying to determine a suitable coefficient and a initial flowrate when using CEL.
I can use CEL well, but i should try many times to determine the suitable coefficient and initial flowrate. So i want to use a better method.
suihenry is offline   Reply With Quote

Old   May 14, 2009, 09:54
Default
  #11
Rui
Member
 
Rui's Avatar
 
Rui Igreja
Join Date: Mar 2009
Location: Aveiro
Posts: 68
Blog Entries: 1
Rep Power: 17
Rui is on a distinguished road
Myself never used User Fortran in CFX. And I asked "why?", because I was curious about what you had said.

But I know User Fortran isn't any miraculous tool. I'm pretty sure you can do many more things than you can do just with CEL, but if you want to calculate the inlet flowrate as function (whatever it may be) of the force caused by the flow, as this force caused by the flow will only be possible to obtain if you have an inlet flow rate, it seems obvious that you'll an initial estimative.

In the expression indicated by longbow inletMass=massFlow@(inlet)+coef*(spring force - force_z@(check valve)), what happens when the simulation has converged? The spring force will be equal to the force_z@(check valve), and the equation becomes simply inletMass=massFlow@(inlet). So the value you use for coef doesn't really matter, at least theoretically. A high value will speed up the convergence of this equation, but it may also lead to instability.
__________________
Rui
Rui is offline   Reply With Quote

Old   May 14, 2009, 13:41
Default
  #12
New Member
 
henry wang
Join Date: May 2009
Posts: 13
Rep Power: 16
suihenry is on a distinguished road
Thanks very much to Rui and longbow's selfless help.
I learned more about CFX. hehe.
suihenry is offline   Reply With Quote

Old   May 14, 2009, 17:59
Default
  #13
Rui
Member
 
Rui's Avatar
 
Rui Igreja
Join Date: Mar 2009
Location: Aveiro
Posts: 68
Blog Entries: 1
Rep Power: 17
Rui is on a distinguished road
So, share what you've learnt with we all
__________________
Rui
Rui is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFX turbo - Mass flow rate Vashishth Patel CFX 7 April 3, 2014 20:33
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24
Transient inlet mass flow rate BC HIHI FLUENT 0 May 9, 2006 12:10
How to define mass flow rate using UDF? SAMUEL FLUENT 3 December 25, 2004 00:36
length scales at inlet for internal flows Anne-Marie Giroux Main CFD Forum 3 July 5, 1999 21:28


All times are GMT -4. The time now is 20:03.