CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Boundary condition types for pressure inlet and outlet

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 17, 2021, 15:23
Default Boundary condition types for pressure inlet and outlet
  #1
New Member
 
Sam Phillips
Join Date: Jan 2021
Posts: 8
Rep Power: 5
Sam Phillips is on a distinguished road
Hi,

I am trying to simulate the flow through a circular pipe using rhoSimpleFoam. I am using a k-w SST model and have exported my mesh from Pointwise. When I try to run the simulation it crashes after 1-2 iterations due to a floating point exception. From analysing the results I have in paraview, I believe the problem may be coming from how I am specifying my boundary conditions. The only boundary conditions I know are that there is a pressure of 100,000 Pa at the inlet of the pipe and a pressure of 95,000 Pa at the outlet. I set up my p file using a totalPressure boundary type at the inlet and a fixedValue type at the outlet. For U, I used a pressureInletOutletVelocity type at inlet and a inletOutlet type at outlet. I thought these boundary conditions would be suitable but the simulation is still crashing, can anyone advise me on what boundary conditions I should be using when I know the pressure at inlet and outlet? I have attached my p, U and T files for reference.

Many thanks for your help,
Sam
Attached Files
File Type: txt T.txt (1.1 KB, 3 views)
File Type: txt U.txt (1.1 KB, 2 views)
File Type: txt p.txt (1.1 KB, 4 views)
Sam Phillips is offline   Reply With Quote

Old   February 18, 2021, 16:48
Default
  #2
Member
 
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 10
fedez91 is on a distinguished road
If it crashes after one or two iterations it may be the initial conditions for k or omega. What do you have for those variables?
fedez91 is offline   Reply With Quote

Old   February 19, 2021, 05:48
Default
  #3
New Member
 
Sam Phillips
Join Date: Jan 2021
Posts: 8
Rep Power: 5
Sam Phillips is on a distinguished road
Hi Federico,

I've attached my k and omega files.

I have a k value at the inlet of 1e-3 and an omega value at the inlet of 1. I obtained these values from OpenFOAM's tutorial case of the NACA Aerofoil. I was under the impression that I didn't need to worry too much about the initial values of the turbulence parameters as the simulation will update these values as it runs. If these values aren't suitable, could you advise on how to go about selecting more appropriate values for k and omega?

Many thanks for your help,
Sam
Attached Files
File Type: txt omega.txt (1.3 KB, 4 views)
File Type: txt k.txt (1.3 KB, 4 views)
Sam Phillips is offline   Reply With Quote

Old   February 19, 2021, 17:35
Default
  #4
Member
 
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 10
fedez91 is on a distinguished road
After some time they should update and they should not cause any trouble, but sometimes if the values at the beginning of the simulation are too big or too small, the run crashes really fast. I thought that maybe you set k=0 in the domain, leading to issues when calculating nut. I generally use this turbulence calculator to set initial conditions (https://www.cfd-online.com/Tools/turbulence.php). Try it out and see if that improves the results.

Another thing I was thinking is maybe to set one BC with a fixed velocity (in case you know it) and the other one with a pressure. The pressure drop along the pipe should come out of the simulation itself.

Have you check the mesh quality after you exported it?
fedez91 is offline   Reply With Quote

Old   February 20, 2021, 19:29
Default
  #5
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
I think this error usually comes, when you divide by 0. So I guess your temperature BCs might be the problem. I think you should try totalTemperature with totalPressure and at the outlet you can use zeroGradient or inletOutlet. If that doesnt help you should post your fvSchemes.
shock77 is offline   Reply With Quote

Old   February 21, 2021, 12:45
Default
  #6
New Member
 
Sam Phillips
Join Date: Jan 2021
Posts: 8
Rep Power: 5
Sam Phillips is on a distinguished road
Hi all,

Thanks for your suggestions! I have tried changing the Temperature BC type at the inlet to totalTemperature and will let you know what impact this has.

I have checked the mesh quality after exporting it. I do have some high aspect ratio cells and non-orthogonality in the mesh, but I developed the mesh with a distributor from Pointwise and he assures me that the mesh should be good enough to run in OpenFOAM. I have attached the checkMesh result from OpenFOAM.

In the meantime please find my attached fvSchemes file in case some errors are found in there. Let me know what you think.

Thanks,
Sam
Attached Files
File Type: txt fvSchemes CFD Online.txt (1.7 KB, 2 views)
File Type: txt inlet Edit checkMesh.txt (2.2 KB, 3 views)
Sam Phillips is offline   Reply With Quote

Reply

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
[OLAFLOW] The OLAFLOW Thread Phicau OpenFOAM Community Contributions 457 March 27, 2024 00:59
Cyclic boundary condition in foam-extend 4.0 rellumeister OpenFOAM Pre-Processing 2 March 3, 2020 08:03
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 05:15
boundary condition for coupled inlet and outlet xxxx OpenFOAM Pre-Processing 2 August 13, 2013 15:51
outlet to inlet boundary condition assighna CFX 1 May 10, 2007 23:36


All times are GMT -4. The time now is 23:41.