|
[Sponsors] |
[swak4Foam] groovyBC lookup tables for Reynolds stress R tensor field |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 23, 2017, 06:21 |
groovyBC lookup tables for Reynolds stress R tensor field
|
#1 |
Senior Member
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13 |
Hello,
I searched a bit on the forum and it seems that I'm one of the fewest lucky people that can afford to setup all the six Reynolds stress at the inlet from experimental data . I'm doing a benchmark simulation to test the behavior of the several turbulence models in that specific case (divergent diffuser) and I would like to see how the RSM models behave. It's the first time I use RSM models, sorry if I would result a bit unexperienced. By the way I have experimental points for all the six (uu, uv, uw, vv, vw, ww) Reynolds stress components. In the case of scalar (or vectorial) fields what I do is: Scalar Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object omega; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 -1 0 0 0 0]; internalField uniform 1; boundaryField { inlet { type groovyBC; value $internalField; lookuptables ( { name expInlet; outOfBounds clamp; fileName "$FOAM_CASE/inlet/omega.dat"; } ); valueExpression "expInlet(pos().y)"; } outlet { type zeroGradient; } walls { type omegaWallFunction; value uniform 1e-6; } front { type wedge; } back { type wedge; } axis { type empty; } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 2); boundaryField { inlet { type groovyBC; value $internalField; lookuptables ( { name expInlet; outOfBounds clamp; fileName "$FOAM_CASE/inlet/u_14_ort.dat"; } ); valueExpression "-expInlet(pos().y)*normal()"; } outlet { type zeroGradient; } walls { type noSlip; } front { type wedge; } back { type wedge; } axis { type empty; } } // ************************************************************************* // |
|
November 10, 2018, 07:53 |
|
#2 |
New Member
Gerhard
Join Date: Mar 2017
Posts: 26
Rep Power: 9 |
I am also interested to test RSM models on the ERCOFTAC conical diffuser for which experimental data is available.
Please let me know whether you managed to figure this out. Thanks |
|
November 10, 2018, 11:59 |
|
#3 |
New Member
Gerhard
Join Date: Mar 2017
Posts: 26
Rep Power: 9 |
Hi
I think I might have figured it out. Let me know what you think. Tensor Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volSymmTensorField; object R; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform (0 0 0 0 0 0); boundaryField { inlet { type groovyBC; value uniform (0 0 0 0 0 0); lookuptables ( { name Ruu; file "$FOAM_CASE/0/Ruu.data"; outOfBounds clamp; } { name Rww; file "$FOAM_CASE/0/Rww.data"; outOfBounds clamp; } { name Rvv; file "$FOAM_CASE/0/Rvv.data"; outOfBounds clamp; } { name Ruw; file "$FOAM_CASE/0/Ruw.data"; outOfBounds clamp; } { name Ruv; file "$FOAM_CASE/0/Ruv.data"; outOfBounds clamp; } { name Rvw; file "$FOAM_CASE/0/Rvw.data"; outOfBounds clamp; } ); variables ( "origin=vector(0,0,0.025);" // Patch centre (vector) "rp=pos()-origin;" // Radii from centre (vector) "r=mag(rp);" // Radii from centre (scalar) "vv=symmTensor(1,0,0,0,0,0);" "vw=symmTensor(0,1,0,0,0,0);" "uv=symmTensor(0,0,1,0,0,0);" "ww=symmTensor(0,0,0,1,0,0);" "uw=symmTensor(0,0,0,0,1,0);" "uu=symmTensor(0,0,0,0,0,1);" "xDir=vector(1,0,0);" "yDir=vector(0,1,0);" "zDir=vector(0,0,1);" ); valueExpression "Rvv(r)*vv + Rww(r)*ww + Ruu(r)*uu + Rvw(r)*vw + Ruw(r)*uw + Ruv(r)*uv"; } casing { type kqRWallFunction; value $internalField; } diffuser { type kqRWallFunction; value $internalField; } dump { type zeroGradient; } outlet { type zeroGradient; } axis { type symmetryPlane; } front { type wedge; } back { type wedge; } } // ************************************************************************* // |
|
July 19, 2021, 03:37 |
Applying temperature only at certain provided locations of x.
|
#4 |
Member
L S
Join Date: Apr 2016
Posts: 63
Rep Power: 10 |
I have been trying to simulate nucleate boiling in OpenFOAM. With present model in phaseChangeHeatFoam the wall constant wall temperature can be applied throughout the wall having fixed value. Which generates a thin vapor layer first and then it breaks into several nucleation sites due to density difference. (See bottom nucleation image file attached below)
Now, What I want to do is, apply random value of wall temperature only at certain provided locations (also randomly chosen locations) in lookup table (see posx image file attached below). I want the nucleation to start only at certain locations and not from entire wall. One such possibility is to use lookup table feature in groovyBC and another is codedFixedValue BC. But, I could not really figure out that how to use it for my specific purpose. |
|
Tags |
groovybc, lrr, reynolds stress model, ssg, swak4foam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DPMFoam - Serious Error --particle-laden flow in simple geometric config | benz25 | OpenFOAM Running, Solving & CFD | 27 | December 19, 2017 21:47 |
[ANSYS Meshing] Error in Workbench "Unable to attach to geometry file" | Jeremie84 | ANSYS Meshing & Geometry | 70 | October 25, 2017 17:03 |
Lookup tables | ali.m.1 | OpenFOAM Running, Solving & CFD | 2 | May 13, 2016 08:11 |
[swak4Foam] groovyBC 2D lookup | ecbmxer | OpenFOAM Community Contributions | 1 | September 24, 2015 11:21 |
Convergence on anisotropic tetahedral meshes | pbo | OpenFOAM Running, Solving & CFD | 12 | December 14, 2010 12:59 |