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

Pressure outlet as a function of the flow rate (windkessel)

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By PranjalNewton

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 14, 2015, 13:22
Default Pressure outlet as a function of the flow rate (windkessel)
  #1
New Member
 
Andrew Norfolk
Join Date: Mar 2015
Location: Sheffield
Posts: 5
Rep Power: 11
Trev0r is on a distinguished road
Hey everyone, this is my first post so I'll try to be as concise as possible for you but I apologise if it's a bit long winded as I'm not too sure what to include so you can help out.

I'm trying to model artery bifurcations using idealised geometries and so far the simulation is steady state with rigid walls and I have prescribed a fully developed parabolic velocity profile at the inlet using a CEL expression. I'm going to be adding progressively more complexity (transient inlet flow waveforms and non-Newtonian viscosity models) to the model to make it more representative but for now I've hit a snag in describing the outlet boundary conditions.

In general the outlet static pressures can be treated as linear functions of the flow rates through them (accounting for the resistance of the arteries downstream and outside the domain of the simulation). I tried to model this using the following CEL expressions applied to the pressure outlets:

Pressure1=resistance1*areaInt_z_Coord1(w)@Outlet1
Pressure2=resistance2*areaInt_z_Coord2(w)@Outlet2

resistance1 and resistance2 are predefined constants. Coord1 and Coord2 are local coordinate systems centred at the outlet faces with the z axes perpendicular to them. Basically static pressure=resistance*flowrate

I set up monitors to watch these expressions converge during the solution process. I'm under the impression that at the end of each iteration the static pressures at the outlets are recalculated according to these formulas and updated ready for the next iteration. However it quickly became apparent that the values for static pressure at the outlets in the converging and converged solution do not equal the flow rate x resistance like in equations I set above.

In fact checking the flow rate through the outlets with the function calculator in CFD post and then multiplying that value by the predefined resistance that I set gives a vastly different static pressure to the one CFD post is reporting in the solution???

For example in one trial run shown in the attachments i've provided I set both resistances to 10^{9} Pa\ s\ m^{-3} and the resultant flow rates through outlet1 and outlet2 were converged at 6.53501.10^-6\ m^3 s^-1 and 6.37539.10^-8\ m^3 s^-1 respectively. This should have therefore resulted in the static pressures at the outlets being 6535\ Pa and 0.638\ Pa. The actual static pressures reported at the outlets in CFD post are 3.69304\ Pa and 0.121419\ Pa. When I evaluate my two expressions in CFD post they give me the values I expect yet these are not the values applied to the outlets?

In summary my outlet CEL expressions are having an affect on the outlet pressures but they are not behaving as expected. Does anybody have any idea what I am doing wrong and why my static pressures at the outlets do not equal the values set in my expressions?

Many thanks

Trev0r
Attached Images
File Type: jpg monitors.jpg (34.7 KB, 162 views)
File Type: jpg pressure results.jpg (23.5 KB, 130 views)
File Type: jpg setup.jpg (25.3 KB, 134 views)
File Type: jpg Mesh.jpg (29.6 KB, 93 views)
Trev0r is offline   Reply With Quote

Old   March 14, 2015, 13:55
Default
  #2
New Member
 
Andrew Norfolk
Join Date: Mar 2015
Location: Sheffield
Posts: 5
Rep Power: 11
Trev0r is on a distinguished road
I've actually solved this now, I needed to integrate the global velocity components v over outlet1 and u over outlet2 instead of w. I thought using the local coordinate system with z normal to the outlets changed the definition of the velocity componets but global velocity components, not local ones must be used.
Trev0r is offline   Reply With Quote

Old   October 25, 2015, 02:31
Default
  #3
Member
 
PranjalNewton's Avatar
 
Pranjal Singh
Join Date: Sep 2015
Posts: 34
Rep Power: 11
PranjalNewton is on a distinguished road
Hi there, Did you try the transient formulation? I've been trying to apply pressure as function of previous pressure and flow rate. I've been trying to do this through UDFs in fluent but after a long time, I finally came to know CFX can also do FSI simulation. Can you please suggest a way to get values of a variable at previous time step? I know that CFX only keeps current value so there has to be a file i/o method.

Please help. Thanks.
PranjalNewton is offline   Reply With Quote

Old   October 27, 2015, 15:58
Default
  #4
Senior Member
 
Join Date: Apr 2009
Posts: 531
Rep Power: 21
stumpy is on a distinguished road
Why do you need the pressure at the previous timestep? Are you calculating dP/dt? If so, just ask for Pressure.Time Derivative in your CFX expressions.
If you really do need to old pressure, there's a hack you can use. Search this forum for "Update Loop = TRANS_LOOP".
stumpy is offline   Reply With Quote

Old   October 28, 2015, 01:10
Default
  #5
Member
 
PranjalNewton's Avatar
 
Pranjal Singh
Join Date: Sep 2015
Posts: 34
Rep Power: 11
PranjalNewton is on a distinguished road
I tried that but I'm getting errors. SO, instead of solving for the differential equation, I did backward discretization so that I just need these values. I did that by UPDATE_LOOP command through same process you discribed. The Multifield solver just doesn't run giving an error code zero. (Note that I've gone through the CFX-ANSYS Training. I've taken all the necessary considerations I could.)

A major question that I have, which experienced person like yourself might answer is: Is it possible that some approximation like newtonian fluid or medium mesh may result in solver not even solving? As far as I know, you just obtain an unrealistic result.
PranjalNewton is offline   Reply With Quote

Old   October 28, 2015, 08:58
Default
  #6
Senior Member
 
Join Date: Apr 2009
Posts: 531
Rep Power: 21
stumpy is on a distinguished road
Error code zero doesn't mean too much. What's in the CFX and MAPDL log files before that error?
stumpy is offline   Reply With Quote

Old   October 28, 2015, 10:48
Default
  #7
Member
 
PranjalNewton's Avatar
 
Pranjal Singh
Join Date: Sep 2015
Posts: 34
Rep Power: 11
PranjalNewton is on a distinguished road
I got it! I was getting a back flow at outlet. I modeled it as 'outlet' rather than 'Opening'. After all the studies into solver stability and Theory Guides, It finally came down to such a simple mistake

Thank you for helping. (I looked into the log files and found that outlet was being closed!).
Yanlu likes this.
PranjalNewton is offline   Reply With Quote

Old   February 17, 2017, 18:50
Default
  #8
Member
 
Ftab
Join Date: Sep 2011
Posts: 87
Rep Power: 15
ftab is on a distinguished road
I have a question regarding setting Windkessel model in steady solution and appreciate if Andrew or Pranjal answer it.
When you are setting the boundary you have two options:Opening or Pressure outlet.
If you set it as opening with ~6000 Pa pressure, there will definitely be a back flow (according to your own pressure contour in Post 1) and there will be negative pressure as the boundary.
Setting as pressure outlet is even worse as 100% of the outlet will be changed to wall.
How did you both manage to converge to correct solution?
ftab is offline   Reply With Quote

Old   May 24, 2017, 12:15
Default
  #9
New Member
 
joe
Join Date: Jun 2016
Posts: 2
Rep Power: 0
shiju7279 is on a distinguished road
Can you please share the udf file for it?
Quote:
Originally Posted by Trev0r View Post
I've actually solved this now, I needed to integrate the global velocity components v over outlet1 and u over outlet2 instead of w. I thought using the local coordinate system with z normal to the outlets changed the definition of the velocity componets but global velocity components, not local ones must be used.
shiju7279 is offline   Reply With Quote

Old   October 23, 2023, 02:56
Default
  #10
New Member
 
zh
Join Date: Oct 2023
Posts: 13
Rep Power: 3
zh&c is on a distinguished road
Hello,I want to calculate dQ/dt? Could you tell me how to get previous time step flow rate?Thank you!
zh&c is offline   Reply With Quote

Old   October 23, 2023, 17:50
Default
  #11
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
The supported way of doing it is using a user fortran routine - and note you will have to store the variable yourself, it is not kept in CFX.

stumpy's post covers other options:
Quote:
Are you calculating dP/dt? If so, just ask for Pressure.Time Derivative in your CFX expressions.
If you really do need to old pressure, there's a hack you can use. Search this forum for "Update Loop = TRANS_LOOP".
Note the TRANS_LOOP approach is unreliable and unsupported. It might not work for you.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks 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
Pressure Outlet Targeted Mass Flow Rate LuckyTran FLUENT 1 November 23, 2016 11:40
which BC for getting outlet pressure in a channel flow josephmp Main CFD Forum 3 February 9, 2015 15:59
Mass flow inlet and pressure outlet issue nikhil FLUENT 5 December 11, 2013 13:30
Guessing the static pressure needed to produce flow rate jpo FLUENT 0 June 22, 2009 13:53
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


All times are GMT -4. The time now is 13:01.