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

Is is possible to use OFstream in a turbulence model?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 30, 2014, 03:10
Default Is is possible to use OFstream in a turbulence model?
  #1
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
Hi,all:
I implement a model as here http://www.cfd-online.com/Forums/ope...model-les.html

I want to output the model coefficient as it runs, the most simple way may be something like
Code:
Info<< "Uncorrected Ubar = " << magUbarStar.value() << tab
            << "pressure gradient = " << gradP.value() << endl;
as in channelfoam
However, when I tried like this, it seems that it doesn't work.
Can anyone point out whether it's possible?
I tried another method, by defining it as a scalarfield to output as the other variables such as U and p,but this requires an initial value, when I set the internal filed of it , the value keeps the same all the time, how can it be?

Xianbei
huangxianbei is offline   Reply With Quote

Old   September 1, 2014, 03:34
Default
  #2
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
well, I find that if I define it as a scalarfield, it's almost the case of nuSgs which doesn't output as a field, just a file containing boundary conditions.

So is there any way to do this?
huangxianbei is offline   Reply With Quote

Old   September 1, 2014, 05:57
Default
  #3
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
I find a much more easier way!

Defining cV as a volScalarField(don't do the volume average), so cV can be output as a field. Then we can calculate the volumeAverage of cV by using swak4Foam.

However, the question is:
Why the cV field is can output as a field? Here is the model
DVM-Cvout.tar.gz
huangxianbei is offline   Reply With Quote

Old   September 1, 2014, 06:55
Default
  #4
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
Here is the initial condition for cV
Code:
dimensions      [ 0 0 0 0 0 0 0 ];

internalField   uniform 0.07;

boundaryField
{
    in
    {
        type            calculated;
        value           uniform 0.07;
    }
    out
    {
        type            calculated;
        value           uniform 0.07;
    }
   
    hub
    {
        type            calculated;
        value           uniform 0.07;
    }

    shroud
    {
        type            calculated;
        value           uniform 0.07;
    }
    
    blade
    {
        type            calculated;
        value           uniform 0.07;
    }

    peri1
    {
        type            cyclic;
    }
    peri2
    {
        type            cyclic;
    }
}
I'm considering whether it's right to implement such kind of initial condition
huangxianbei is offline   Reply With Quote

Old   September 1, 2014, 09:00
Default
  #5
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
The problem should be in the code that nuSgs is not output correctly, only the boundary values found. How do this come from? Can anyone help?
huangxianbei 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
SimpleFoam case with SpalartAllmaras turbulence model implemented nedved OpenFOAM Running, Solving & CFD 2 November 30, 2014 23:43
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 15:32
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44
Wrong calculation of nut in the kOmegaSST turbulence model FelixL OpenFOAM Bugs 27 March 27, 2012 10:02
Low Reynolds k-epsilon model YJZ ANSYS 1 August 20, 2010 14:57


All times are GMT -4. The time now is 18:21.