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

CFX Simple valve model, inlet and outlet conditions

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2014, 10:18
Default CFX Simple valve model, inlet and outlet conditions
  #1
New Member
 
James
Join Date: Jul 2014
Location: Wales
Posts: 12
Rep Power: 11
749604 is on a distinguished road
I am trying to model a valve using CFX. It is supposed to be a simple 2D simulation and involves a region of high pressure helium entering another region of air at atmospheric pressure. The high pressure (310 bar) helium enters the air region through a 3.5 mm inlet and there is a 20 mm opening in the air region. I've assumed that the helium region is just an infinite volume at 310 bar. I have a geometry for the second region which is basically a rectangle with an inlet at the bottom and an opening on the side wall.

How should I define the inlet and outlet boundary conditions? i do not know the mass flow rate or velocity at inlet so I have set the total pressure to 310 bar with reference pressure 1 atm. The outlet of the air region is given a static pressure with 0 relative pressure.

I have seen in the documentation that it is not advised to specify pressure at both the inlet and outlet but that is the only information I have.

The outside of the outlet is also at 1 atm like the air region.
The air region has a wall around it apart from the inlet and outlet.
I am also confused as to how to model the volume of the air region, I have a value for the volume but I am doing a 2D simulation in xy plane (2 elements in z-direction) so how can i relate the 2D rectangle to the volume I need?



New mesh:

Last edited by 749604; July 18, 2014 at 08:31. Reason: added picture
749604 is offline   Reply With Quote

Old   July 17, 2014, 10:42
Default
  #2
Senior Member
 
JuPa's Avatar
 
Mr CFD
Join Date: Jun 2012
Location: Britain
Posts: 361
Rep Power: 14
JuPa is on a distinguished road
Provide us with a picture.
JuPa is offline   Reply With Quote

Old   July 17, 2014, 10:55
Default
  #3
New Member
 
James
Join Date: Jul 2014
Location: Wales
Posts: 12
Rep Power: 11
749604 is on a distinguished road
Added image.
749604 is offline   Reply With Quote

Old   July 17, 2014, 19:20
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,665
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
This flow is going to be high Mach number so you are going to need a better quality and resolution mesh that what you have.

It is fine to use pressure inlets and outlets if that is the information you have. They are just a little harder to converge than massflow/pressure combinations.
ghorrocks is offline   Reply With Quote

Old   July 17, 2014, 19:55
Default
  #5
Senior Member
 
Join Date: Jun 2009
Posts: 1,788
Rep Power: 31
Opaque will become famous soon enough
Regarding your concern about using pressure boundary conditions, the documentation only says that such combination is sensitive to the initial guess, and as Glenn mentioned, they are little harder to converge.

Why are they sensitive to converge ? Let us use look at simple duct flow with total pressure inlet with static pressure outlet. In such configuration, we are already bounding the maximum mass flow through the system since for a flow with no losses, the difference between the total and static pressure is the dynamic head (rho*v^2 / 2 for incompressible fluid), and since the area is known the velocity is also implied. Using an initial guess above such value will be non-physical.

For the same example, the combination of static pressure inlet and static pressure outlet would be even worse since the pressure difference can only be balanced by the losses which are a function of the wall shear. Such setup may (if it does) only converge if the mesh is good enough for the flow model (laminar or turbulent) to predict the wall shear to match the pressure drop.

That is my interpretation of the recommendations,
Opaque is offline   Reply With Quote

Old   July 18, 2014, 08:19
Default
  #6
New Member
 
James
Join Date: Jul 2014
Location: Wales
Posts: 12
Rep Power: 11
749604 is on a distinguished road
Thanks for the help guys. I have refined the mesh. I have an additional question, if I have one element in the extruded direction do I set symmetry boundary conditions on the top and bottom walls? Or should I just leave it as 2 or 3 elements in the extruded direction?

Here are some results, I changed the geometry a little. The first 2 images are using 3 elements in the extruded direction and the second 2 images are using 1 element in the extruded direction with symmetry boundaries on top and bottom surfaces. So there's clearly a big difference, so am i doing something wrong?

3 elements in z-direction




1 element in z-direction


749604 is offline   Reply With Quote

Old   July 19, 2014, 07:18
Default
  #7
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,665
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
No, what you are doing is essential. What it is suggesting is that your flow is not 2D but is more likely 3D. I would recommend extruding a reasonable distance in the z direction and giving it plenty of mesh elements. Run a simulation (almost certainly transient is required) and I bet you will find it is 3D and transient.
ghorrocks is offline   Reply With Quote

Old   July 22, 2014, 09:26
Default
  #8
New Member
 
James
Join Date: Jul 2014
Location: Wales
Posts: 12
Rep Power: 11
749604 is on a distinguished road
Ok, I have changed the geometry to make it more 3D. Evidence would suggest that the results i was getting before were indeed incorrect. My problem now is that I can't get CFX to run my new setup.

It runs for 1 complete iteration then gives me this error:

+--------------------------------------------------------------------+
| ERROR #001100279 has occurred in subroutine ErrAction.
| Message:
| Floating point exception: Multiple faults
|
+--------------------------------------------------------------------+

+--------------------------------------------------------------------+
| ERROR #001100279 has occurred in subroutine ErrAction.
| Message:
| Stopped in routine FPX: C_FPX_HANDLER
|
+--------------------------------------------------------------------+

+--------------------------------------------------------------------+
| An error has occurred in cfx5solve:
|
| The ANSYS CFX solver exited with return code 1. No results file
| has been created.
+--------------------------------------------------------------------+

This is my mesh:
749604 is offline   Reply With Quote

Old   July 22, 2014, 20:13
Default
  #9
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,665
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
FAQ: http://www.cfd-online.com/Wiki/Ansys...do_about_it.3F
ghorrocks is offline   Reply With Quote

Old   July 25, 2014, 11:57
Default
  #10
New Member
 
James
Join Date: Jul 2014
Location: Wales
Posts: 12
Rep Power: 11
749604 is on a distinguished road
Ok, well i've changed the geometry again as it seems i'm going to need a more accurate model anyway.
My geometry now looks like this:


I have two domains connected at an interface, if I want the lower domain (domain 2) to be at 309 bar and domain 1 to be at atmospheric pressure do I just set that in the initialisation conditions tab?

Edit: I should be expecting velocities of around Mach 3, is CFX still suitable for simulating this?
749604 is offline   Reply With Quote

Old   July 26, 2014, 07:18
Default
  #11
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,665
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
CFX has models appropriate to go up to around Mach 5. In other words CFX does not have hypersonics models (eg dissociation), but supersonic and transonic flow is modelled.

Then you just initialise one domain to be one pressure and the other to be another. But this does not seem to require multiple domains. Model it as one domain and use an initial condition which uses the inside function or a function of z height to define the pressure.
ghorrocks is offline   Reply With Quote

Old   July 27, 2014, 08:17
Default
  #12
New Member
 
James
Join Date: Jul 2014
Location: Wales
Posts: 12
Rep Power: 11
749604 is on a distinguished road
I would like to have the option of changing the fluid properties of the two domains so I kept them separate. I have tried different initialisations for domain 2 whilst keeping domain 1 the same but I can't get any flow between the two domains. For instance I set the w component of velocity to 50 m/s in domain 2 to try and get flow along the +ve z-direction up into domain 1 but it doesn't instead the streamlines do this:
749604 is offline   Reply With Quote

Old   July 27, 2014, 19:47
Default
  #13
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,665
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Quote:
I would like to have the option of changing the fluid properties of the two domains so I kept them separate.
No, bad idea. I read from your initial post that it is high pressure helium escaping into low pressure air. In this case you should be using a single domain, multicomponent simulation. This will also account for the mixing of the two gases.
ghorrocks is offline   Reply With Quote

Old   July 29, 2014, 07:51
Default
  #14
New Member
 
James
Join Date: Jul 2014
Location: Wales
Posts: 12
Rep Power: 11
749604 is on a distinguished road
Thanks for the advice Glenn, I have the simulation working at the moment, I just needed to use a much smaller timestep. At the moment i'm just modelling pressurised air so I'm still using two domains. Is there a simple way in CFX post to produce a graph of maximum pressure in a domain against time? Or do I need to find the location of maximum pressure and just plot the pressure from that location each timestep?
749604 is offline   Reply With Quote

Old   July 29, 2014, 08:04
Default
  #15
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,665
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
This simulation does not need two domains, regardless of what fluid model you use. It should be a single domain. But the penalty of running multiple domains is usually low, so hopefully you get away with it.

Put a monitor point in with something like maxVal(pressure)@DomainName. Then run the simulation and it will appear on the solver monitors in Solver Manager.
ghorrocks is offline   Reply With Quote

Old   July 29, 2014, 08:56
Default
  #16
New Member
 
James
Join Date: Jul 2014
Location: Wales
Posts: 12
Rep Power: 11
749604 is on a distinguished road
Great, thanks. I am a little unsure about setting up a multicomponent flow. If I set it up as one domain where do I specify that the lower volume is at 309 bar? At the moment i'm using the domain initialisation to set up the pressure which would include the entire geometry if I only have one domain.
749604 is offline   Reply With Quote

Old   July 29, 2014, 09:02
Default
  #17
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,665
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Try the reacting flow in a mixing tube tutorial.

You can define initial conditions with CEL expressions, such as if(x>3[m],309[bar],0[bar]) or you could define a mesh region as a subdomain and use if(inside()@SubdomainName,309[bar],0[bar])
ghorrocks is offline   Reply With Quote

Old   July 30, 2014, 11:14
Default
  #18
New Member
 
James
Join Date: Jul 2014
Location: Wales
Posts: 12
Rep Power: 11
749604 is on a distinguished road
Ok, so if I want to have the pressurised helium entering into atmospheric air I can't avoid using CEL expressions?
749604 is offline   Reply With Quote

Old   July 30, 2014, 19:36
Default
  #19
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,665
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
There are many ways of doing this and they are all quite simple. Multiple domains works - but has disadvantages (reduced quality of partitioning of the domains for instance).
ghorrocks is offline   Reply With Quote

Old   August 8, 2014, 06:49
Default
  #20
New Member
 
James
Join Date: Jul 2014
Location: Wales
Posts: 12
Rep Power: 11
749604 is on a distinguished road
Hi Glenn, I have a few of questions.

1. Does the expression "if(x>3[m],309[bar],0[bar])" require a locator? Or does it automatically apply to all domains?

2. Can a similar expression be used to define fluid properties/materials or volume fractions?

3. To initialise the if statement do I just create an expression with it in and then it will be applied by the solver?

4. I have seen in the CFX solver advanced controls that there are some options for running simulations on multiple CPU cores, is it as simple as selecting one of the local multi core options? I tried this but it doesn't seem to work.

Appreciate the help!
749604 is offline   Reply With Quote

Reply

Tags
boundaries condition, cfx, inlet, outlet, valve simulation

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Using Outlet and Inlet Boundary Conditions tylerplowright CFX 8 January 28, 2014 18:22
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11
using outlet conditions as inlets for other model George Siemens 1 February 1, 2002 06:27
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 06:13


All times are GMT -4. The time now is 09:52.