|
[Sponsors] |
Modified simpleFOAM using given Reynolds stress field |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 24, 2016, 12:55 |
Modified simpleFOAM using given Reynolds stress field
|
#1 |
New Member
Martin Schmelzer
Join Date: Aug 2012
Location: TU Delft
Posts: 4
Rep Power: 14 |
Dear OpenFOAM-users,
My aim is to run a RANS simulation with a given Reynolds-stress tensor field . This will come from a previous RANS simulation of the same case but will be (slightly) modified, i.e. . In order to write a solver, which is able to do that, I used simpleFoam (OF2.3.0). The UEqn.C file contains the following lines Code:
tmp<fvVectorMatrix> UEqn ( fvm::div(phi, U) + turbulence->divDevReff(U) == fvOptions(U) ); The pointer Code:
turbulence->divDevReff(U) Code:
tmp<fvVectorMatrix> LRR::divDevReff(volVectorField& U) const { ... return ( fvc::div(R_) + fvc::laplacian(nut_, U, "laplacian(nuEff,U)") - fvm::laplacian(nuEff(), U) ); } This leads to the following implementation of my new solver Code:
tmp<fvVectorMatrix> UEqn ( fvm::div(phi, U) + fvc::div(R) + fvc::laplacian(nut, U, "laplacian(nuEff,U)") - fvm::laplacian(nu+nut, U) == fvOptions(U) ); Code:
turbulence->correct(); My workflow is like that. STEP 1: I run a simulation using the un-modified simpleFoam solver until the residuals go to machine accuracy or drop a value of 1e-10 or so. I then run the utility R, which computes the Reynolds stresses using the Boussinesq approximation Code:
tmp<volSymmTensorField> kEpsilon::R() const { return tmp<volSymmTensorField> ( new volSymmTensorField ( IOobject ( "R", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)), k_.boundaryField().types() ) ); } For the cases I am looking at I observe that for a smooth geometry (2D hill), the modified solver converges but gives velocity and pressure fields which show differences at the wall of up to 5%. I guess this has to do with the fact how boundaries are treated by the different differential operators (laplacian, div and grad) in OpenFOAM, but I wasn't able to get to the core of this problem. Does anybody have an idea about that? Best wishes, Martin |
|
March 23, 2017, 04:14 |
|
#2 |
New Member
Yangmo Zhu
Join Date: Jan 2016
Posts: 3
Rep Power: 10 |
Thanks you Martin, your thought is exactly the same as mine. Regarding the 5% difference, did you use the same system files in both case? For example, fvscheme.
|
|
March 24, 2017, 04:41 |
|
#3 |
New Member
Yangmo Zhu
Join Date: Jan 2016
Posts: 3
Rep Power: 10 |
Hi Martin, although I didn't work out your method, I found another way to deal with it. I want to share it with you:
1. Calculate nut according to R; 2. Add nut to nu as an internal field; 3. Solve the problem as laminar flow; 4. Done. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] dynamicTopoFVMesh and pointDisplacement | RandomUser | OpenFOAM Meshing & Mesh Conversion | 6 | April 26, 2018 08:30 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Resolved Reynolds Stress in LES | yinyueqiang | FLUENT | 3 | July 24, 2013 12:48 |
Standard K-Epsilon TO Reynolds Stress calculation (for convergence) | wjarrah | Main CFD Forum | 2 | May 27, 2010 06:32 |
Questions about the Reynolds stress model | empirer2002 | Main CFD Forum | 1 | January 5, 2006 08:37 |