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

Internal flow through valve (3D)

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Tobi
  • 1 Post By hxaxtma

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 8, 2019, 11:36
Default Internal flow through valve (3D)
  #1
Senior Member
 
Lee Strobel
Join Date: Jun 2016
Posts: 133
Rep Power: 10
Time4Tea is on a distinguished road
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
Does anyone know how I can resolve this?


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
Attached Images
File Type: jpg 41k_mesh_poly.jpg (83.4 KB, 50 views)
File Type: jpeg 41k_vel_contours.jpeg (43.5 KB, 42 views)
File Type: jpeg 41k_k_contours.jpeg (36.7 KB, 38 views)
File Type: jpeg 41k_eps_contours.jpeg (42.9 KB, 30 views)
Time4Tea is offline   Reply With Quote

Old   July 8, 2019, 12:11
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

I just read your error message and can give you the following info:

Code:
yourSolver -postProcess -time 25 -func yPlus
Time4Tea likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 8, 2019, 12:43
Default
  #3
Senior Member
 
Lee Strobel
Join Date: Jun 2016
Posts: 133
Rep Power: 10
Time4Tea is on a distinguished road
@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.
Time4Tea is offline   Reply With Quote

Old   July 9, 2019, 08:32
Default
  #4
Senior Member
 
Join Date: Jan 2014
Posts: 179
Rep Power: 12
hxaxtma is on a distinguished road
Quote:
It seems curious that it is necessary to invoke the solver though.
yPlus needs the value of viscosity which is retrieved by invoking solver. Same for wallShearstress.

Quote:
Is there any equivalent in OF to the pressure-based coupled solver in FLUENT?
Have a look at foam-extended

Quote:
it is possible to export FLUENT data into Paraview
If Fluent can export the data in Ensight format you can open the data in paraview
Time4Tea likes this.
hxaxtma is offline   Reply With Quote

Old   July 10, 2019, 09:14
Default
  #5
Senior Member
 
Lee Strobel
Join Date: Jun 2016
Posts: 133
Rep Power: 10
Time4Tea is on a distinguished road
@hxaxtma: thanks for your helpful advice.
Time4Tea is offline   Reply With Quote

Old   July 11, 2019, 10:03
Default
  #6
Senior Member
 
Lee Strobel
Join Date: Jun 2016
Posts: 133
Rep Power: 10
Time4Tea is on a distinguished road
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.
Time4Tea is offline   Reply With Quote

Old   August 2, 2019, 03:57
Default
  #7
New Member
 
WJ
Join Date: Feb 2016
Location: MyHome
Posts: 11
Rep Power: 10
misospider is on a distinguished road
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
misospider 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
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


All times are GMT -4. The time now is 12:14.