|
[Sponsors] |
July 8, 2019, 11:36 |
Internal flow through valve (3D)
|
#1 |
Senior Member
Lee Strobel
Join Date: Jun 2016
Posts: 133
Rep Power: 10 |
Hi. I've just attempted my first 'serious' simulation in OpenFOAM and thought I would post some images, with some questions and comments that I have.
The model is a 3D half-symmetric model of a control valve. I have done a lot of simulations of these in FLUENT over the past couple of years, so I am comparing the results in Foam to what I usually get in FLUENT. The flow is incompressible water, with a lot of separation and mixing, so I have used the simpleFoam solver with k-epsilon turbulence model. You can see from the images that I created a polyhedral mesh in FLUENT and then imported it to OF. It has 10 inflation layers. For boundary conditions, I used totalPressure at the inlet of 517 kPa and static pressure at the outlet of 345 kPa. I used the nutkWallFunction on the walls. I had a little bit of trouble at first with the field initialization. Normally in FLUENT I would use the hybrid initialization method, which actually solves some simplified equations to give an initial flow field. However, it seems that OF doesn't have this? Anyway, I eventually had some success with setting the initial velocity everywhere to 0 and initializing the pressure everywhere to the outlet pressure. In terms of the solution, it converged quite nicely and seemed to settle to a very similar overall volumetric flow rate that I had achieved in FLUENT. However, the k and epsilon values in some areas seemed very high (as can be seen in the contour plots - max. k ~50, max. epsilon ~400,000), which I didn't get in FLUENT. However, these high values didn't seem to be having a huge effect on the overall volumetric flow result and also the turbulence equations seemed quite stable. The residuals for the turbulence equations were quite low (< 10^-4). So, it seems that the solution was converged with those high k, epsilon values. In that case, I would think the problem must be an inaccuracy in the model equations that I am using - perhaps the wall function or the yplus values are not appropriate? I tried to check the wall yplus; however, I got the following error Code:
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ Build : 6 Exec : postProcess -time 25 -func yPlus Date : Jul 07 2019 Time : 06:54:13 Host : *** PID : *** I/O : uncollated Case : *** nProcs : 1 fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10) allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 25 Time = 25 Reading fields: Executing functionObjects --> FOAM FATAL ERROR: Unable to find turbulence model in the database From function bool Foam::functionObjects::yPlus::execute() in file yPlus/yPlus.C at line 185. FOAM exiting Another couple of questions that I have: 1) Is there any equivalent in OF to the pressure-based coupled solver in FLUENT? I often use that for these types of internal flow problems and find that it tends to converge faster than the segregated algorithms. 2) I really like Paraview! It seems better for postprocessing than either the built-in capabilities in FLUENT or CFD-Post. Does anyone know if it is possible to export FLUENT data into Paraview? Thanks in advance |
|
July 8, 2019, 12:11 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi,
I just read your error message and can give you the following info: Code:
yourSolver -postProcess -time 25 -func yPlus
__________________
Keep foaming, Tobias Holzmann |
|
July 8, 2019, 12:43 |
|
#3 |
Senior Member
Lee Strobel
Join Date: Jun 2016
Posts: 133
Rep Power: 10 |
@Tobi: ah, thanks! That worked.
It seems curious that it is necessary to invoke the solver though. I would have thought the postprocessing would be done on the result data files, independent of whatever solver was used to generate them. |
|
July 9, 2019, 08:32 |
|
#4 | |||
Senior Member
Join Date: Jan 2014
Posts: 179
Rep Power: 12 |
Quote:
Quote:
Quote:
|
||||
July 10, 2019, 09:14 |
|
#5 |
Senior Member
Lee Strobel
Join Date: Jun 2016
Posts: 133
Rep Power: 10 |
@hxaxtma: thanks for your helpful advice.
|
|
July 11, 2019, 10:03 |
|
#6 |
Senior Member
Lee Strobel
Join Date: Jun 2016
Posts: 133
Rep Power: 10 |
So, does anyone have any idea what might be causing the unrealistic k/epsilon numbers? For the wall boundary conditions, I am using nutkWallFunction in the 0/nut file; kqRWallFunction in the 0/k file; and epsilonWallFunction in the 0/epsilon file.
I also tried running the same case with the kOmegaSST turbulence model, thinking it should be less sensitive to wall y+ than k-epsilon; however, the k/omega solutions explode within a few iterations. There, I again used nutkWallFunction in 0/nut; kqRWallFunction in 0/k; and omegaWallFunction in 0/omega. |
|
August 2, 2019, 03:57 |
|
#7 |
New Member
WJ
Join Date: Feb 2016
Location: MyHome
Posts: 11
Rep Power: 10 |
As k-epsilon works kwSST doesn't work, I think there could be two main possible reasons.
1. Mesh (especially for boundary layer) 2. BCs Because kepsilon model is assuming fully developed flow, usually y+ range is 30-100. kwSST usually requires y+ range from 5 to 30. So, kwSST is more sensitive to boundary layer mesh. And I wonder what initial GUESS values for k ,e and w you used. It is better to use values from calculator, which are available on this site. https://www.cfd-online.com/Wiki/Turb...ary_conditions https://www.cfd-online.com/Tools/turbulence.php |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
About Some Concepts:Laminar flow, turbulent flow, steady flow and time-dependent flow | Jing | Main CFD Forum | 8 | October 5, 2018 18:02 |
pisoFOAM (LES) - internal pipe flow - convergence | gu1 | OpenFOAM Running, Solving & CFD | 19 | August 10, 2018 08:00 |
udf for valve closing a pipe using dynamic mesh | chem engineer | Fluent UDF and Scheme Programming | 2 | May 13, 2017 10:39 |
Coupled wall for Interface/External Flow pass through internal flow | Onurozcan | FLUENT | 0 | December 16, 2015 15:15 |
Internal Flow with Heat Transfer | plucas | OpenFOAM | 2 | January 18, 2013 12:47 |