# CFX Simple valve model, inlet and outlet conditions

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

 July 17, 2014, 09:18 CFX Simple valve model, inlet and outlet conditions #1 New Member   James Join Date: Jul 2014 Location: Wales Posts: 12 Rep Power: 5 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 07:31. Reason: added picture

 July 17, 2014, 09:42 #2 Senior Member     Mr CFD Join Date: Jun 2012 Location: Britain Posts: 324 Rep Power: 8 Provide us with a picture.

 July 17, 2014, 09:55 #3 New Member   James Join Date: Jul 2014 Location: Wales Posts: 12 Rep Power: 5 Added image.

 July 17, 2014, 18:20 #4 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 13,877 Rep Power: 107 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.

 July 17, 2014, 18:55 #5 Senior Member   Join Date: Jun 2009 Posts: 699 Rep Power: 15 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,

 July 18, 2014, 07:19 #6 New Member   James Join Date: Jul 2014 Location: Wales Posts: 12 Rep Power: 5 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

 July 19, 2014, 06:18 #7 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 13,877 Rep Power: 107 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.

 July 22, 2014, 08:26 #8 New Member   James Join Date: Jul 2014 Location: Wales Posts: 12 Rep Power: 5 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:

 July 22, 2014, 19:13 #9 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 13,877 Rep Power: 107

 July 25, 2014, 10:57 #10 New Member   James Join Date: Jul 2014 Location: Wales Posts: 12 Rep Power: 5 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?

 July 26, 2014, 06:18 #11 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 13,877 Rep Power: 107 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.

 July 27, 2014, 07:17 #12 New Member   James Join Date: Jul 2014 Location: Wales Posts: 12 Rep Power: 5 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:

July 27, 2014, 18:47
#13
Super Moderator

Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 13,877
Rep Power: 107
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.

 July 29, 2014, 06:51 #14 New Member   James Join Date: Jul 2014 Location: Wales Posts: 12 Rep Power: 5 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?

 July 29, 2014, 07:04 #15 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 13,877 Rep Power: 107 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.

 July 29, 2014, 07:56 #16 New Member   James Join Date: Jul 2014 Location: Wales Posts: 12 Rep Power: 5 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.

 July 29, 2014, 08:02 #17 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 13,877 Rep Power: 107 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])

 July 30, 2014, 10:14 #18 New Member   James Join Date: Jul 2014 Location: Wales Posts: 12 Rep Power: 5 Ok, so if I want to have the pressurised helium entering into atmospheric air I can't avoid using CEL expressions?

 July 30, 2014, 18:36 #19 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 13,877 Rep Power: 107 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).

 August 8, 2014, 05:49 #20 New Member   James Join Date: Jul 2014 Location: Wales Posts: 12 Rep Power: 5 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!

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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post tylerplowright CFX 9 January 28, 2014 18:22 Attesz CFX 7 January 5, 2013 04:32 Abhi Main CFD Forum 12 July 8, 2002 09:11 George Siemens 1 February 1, 2002 06:27 chong chee nan FLUENT 0 December 29, 2001 06:13

All times are GMT -4. The time now is 06:45.