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

Sampling Temperature and omega (rate k-dissipation)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 14, 2014, 04:33
Default Sampling Temperature and omega (rate k-dissipation)
  #1
New Member
 
Luca
Join Date: Feb 2014
Posts: 19
Rep Power: 3
lfrigeri3 is on a distinguished road
Hi,

I have a strange problem. In my sampleDict file it's all write correctly, and I have to sample U,T,R,omega,nut,k in 7 station (S1,S2,S3.....S7).

If I give command "sample" openFoam doesn't create 6 files for each station, but:
S1_U
S1_R
S1_T_omega
S1_k_nut

Why T-omega and k-nut are writed in the same file??
I should run sample 4 times.. one for "T, U, R" ; one for "omega" ; one for "k" ; and one for "nut" .

Is there a solution? it's very boring!
Thank you
lfrigeri3 is offline   Reply With Quote

Old   February 15, 2014, 12:30
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Luca,

Two questions:
  1. Which OpenFOAM version are you using?
  2. Can you share your "sampleDict" file?
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   February 15, 2014, 13:06
Default
  #3
New Member
 
Luca
Join Date: Feb 2014
Posts: 19
Rep Power: 3
lfrigeri3 is on a distinguished road
Hi Bruno,

I'm using OF 2.2.x on a remote cluster.

This is my sampleDict

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      sampleDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

interpolationScheme cellPoint;

setFormat       gnuplot;

sets
(
    S1
    {
        type    uniform;
        axis    z;
        start   ( 1.3 3.7 0 );
        end     ( 1.3 3.7 2.4 );
        nPoints 200;
    }
    S2
    {
        type    uniform;
        axis    z;
        start   ( 1.3 3.4 0 );
        end     ( 1.3 3.4 2.4 );
        nPoints 200;
    }
    S3
    {
        type    uniform;
        axis    z;
        start   ( 1.3 3.1 0 );
        end     ( 1.3 3.1 2.4 );
        nPoints 200;
    }
    S4
    {
        type    uniform;
        axis    z;
        start   ( 1.3 2.0 0 );
        end     ( 1.3 2.0 2.4 );
        nPoints 200;
    }
    S5
    {
        type    uniform;
        axis    z;
        start   ( 1.3 1.0 0 );
        end     ( 1.3 1.0 2.4 );
        nPoints 200;
    }
    S6
    {
        type    uniform;
        axis    z;
        start   ( 2.1 1.0 0 );
        end     ( 2.1 1.0 2.4 );
        nPoints 200;
    }
    S7
    {
        type    uniform;
        axis    z;
        start   ( 2.1 3.7 0 );
        end     ( 2.1 3.7 2.4 );
        nPoints 200;
    }
    );

fields        (
		T
		U
		R
		k
		omega
		nut
	      );

// ************************************************************************* //
I have to comment some fields to have no problem. I can sample U R k and omega together. But I have that problem when I sample T or nut with k and/or omega.

Thanks
lfrigeri3 is offline   Reply With Quote

Old   February 15, 2014, 14:12
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Luca,

OK, after testing with the tutorial "heatTransfer/buoyantSimpleFoam/buoyantCavity", I've finally remembered about this. The problem is that the sampling source code will group data by type:
  1. U - is a vector field
  2. R - is a tensor field
  3. T omega - are scalar fields
  4. k nut - are also scalar fields... so they should have been placed along with "T omega"...
The logic behind this is that it's more optimal to sample all fields of the same type at the same time and to write them to the same file, instead of placing each one in independent files.

If you want separate files for all, then perhaps it's easiest to configure function objects that will sample while the simulation is running, where you can then re-use the settings from a previous function object... if I could only find such an example here on the forum...

OK, on this post: pressureTools postProcessing function objects in 2.2.0 post #13 - see how "$Average_left" is used in "totalPressure_left"? Basically what it does is load the same settings from "$Average_left" and then overrides only the settings you want to be different. But keep in mind that this is for sampling while the simulation is running. Although, you could rely on this: http://openfoamwiki.net/index.php/Ex...unctionObjects - more specifically, on this: https://github.com/wyldckat/execFunctionObjects

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   February 15, 2014, 14:22
Default
  #5
New Member
 
Luca
Join Date: Feb 2014
Posts: 19
Rep Power: 3
lfrigeri3 is on a distinguished road
Hi Bruno,

Thanks for the perfect explanation.. I still have a lot of things to learn!
However... I already setted up a function in controlDict that write every 30min the result. The problem is that I have made a executable script that clean sample's file, of each fields ,from non-numerical terms and that directly plot with octave.. I earn a lot of time in this way. So it's more proficius to do sample 3 times than write another script from zero

Thanks again!
Luca
lfrigeri3 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:31.