|
[Sponsors] |
May 21, 2015, 09:12 |
Custom wall function problem
|
#1 |
New Member
Kairzhan
Join Date: Jan 2011
Posts: 2
Rep Power: 0 |
Hi Foamers !
I'm trying to implement my turbulence model, and stuck with wall-function for k. I need to specify a value for k on the boundary which is calculated from other variables. So to do this I copied the standard wall-funcion definition from epsilon (epsilonWallFunction) which does the needed functionality but for different variable (epsilon). So I renamed class and all it's methods from epsilon to k. Everything compiled normally. But when I tried to specify new wall-funcions for k I got runtime error message: Unknown pathField type kBuoyantWallFunction for patch type wall... And my wall function is not listed in valid patch field types. However, if I try to specify this same wall-function name ( kBuoyantWallFunction) for epsilon it finds it, as valid wall-function but for wrong variable. So it seems that my wall function is registered in the wrong selection table.. How can I specify where the wall function should be registered ? The code is in attachments. |
|
June 1, 2015, 12:15 |
|
#2 |
New Member
Patrick Grover
Join Date: May 2015
Posts: 1
Rep Power: 0 |
Hi
I am also working on custom wall functions for OpenFoam. I your controlDict file do you link to your custom library? This is what I have added at the bottom of my controlDict file: <code> libs ( "libmyIncompressibleRASModels.so" ); </code> Cheers, Patrick |
|
June 2, 2015, 06:45 |
Solved
|
#3 |
New Member
Kairzhan
Join Date: Jan 2011
Posts: 2
Rep Power: 0 |
Hi Patrick,
Thank you for the reply, but I've finally managed applying custom WF. The problem was in that I didn't commented k_.boundaryField().types() from the kEpsilon.C file: 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() ) ); } |
|
Tags |
openfoam, turbulence, wall functions |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
[mesh manipulation] mergeMeshes problem | Attesz | OpenFOAM Meshing & Mesh Conversion | 3 | July 29, 2015 05:15 |
Problem creating a new Wallfunction on OF 2.2 ! | fredo490 | OpenFOAM Programming & Development | 8 | July 22, 2014 06:16 |
[blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 10:56 |
Wall function in adverse pressure gradients | stephane baralon | Main CFD Forum | 11 | September 2, 1999 05:05 |