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

non-constant blending function

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By eugene

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 8, 2009, 11:06
Default non-constant blending function
  #1
Member
 
Sven Degner
Join Date: Mar 2009
Location: Zürich
Posts: 55
Rep Power: 17
sven82 is on a distinguished road
Dear Foamers,

for my Simulation I will calculate a non-constant blending factor between upwind and CDS. The definition of this factor contains turbulence parameters like epsilon.

And this is my problem, where can I implemented the code part

1. in the solver.C, but how its possible to use the turbulence describe parameters in e.g. simpleFoam.C

2. calculate the blending factor in my turbulence modell.C e.g kEpsilon in a return function, but there is the problem how its possible to link this return function to my solver.C

Thanks, for any help and I'm really hope anybody got a idea for me

Thanks a lot!
Sven
sven82 is offline   Reply With Quote

Old   December 9, 2009, 07:45
Default
  #2
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
Hi Sven,

Your best course of action is the following.

1. Use the localBlended scheme for convections, e.g.

divSchemes
{
div(phi,U) Gauss localBlended linear upwind;
}

2. Define a surfaceScalarField called UBlendingFactor in you top level code. If this field is 1 it will use linear (CD), if this field is 0, the localBlended scheme will use the upwind. You can blend any two schemes this way. The name of the blending field is important and should be <field>BlendingFactor. The localBlended scheme will search the database for this field to use as its blending indicator.

3. To do this in you turbulence model is a bit more tricky. I strongly suggest you try to do it in the top level code. You can access most of the turbulence fields via lookups:

mesh.lookupObjectvolScalarField>("epsilon")

or via calls to the turbulence model base class:

turbulence->epsilon()()
turbulence->k()()

To perform this stuff in the turbulence model is possible. The UBlendingFactor field has to be defined before U is solved for the first time. You could do it by adding the following type of code to your turbulence model constructor:

autoPtr<surfaceScalarField> UBlendingFactor (constructor stuff);

UBlendingFactor->store(UBlendingFactor);

This will switch the ownership of the BlendingFactor object to the central database, from which you can access the object via a lookup:

mesh.lookupObject<surfaceScalarField>("UBlendingFa ctor");

Hope this helps.
nimasam and SHUBHAM9595 like this.
eugene is offline   Reply With Quote

Old   December 12, 2009, 07:34
Default
  #3
Member
 
Sven Degner
Join Date: Mar 2009
Location: Zürich
Posts: 55
Rep Power: 17
sven82 is on a distinguished road
thanks eugene,

" turbulence->epsilon()()
turbulence->k()() "

this is the correct link for me,

sven
sven82 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
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 10:31
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 15:11
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 01:35
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


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