|
[Sponsors] |
Sampling Temperature and omega (rate k-dissipation) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 14, 2014, 03:33 |
Sampling Temperature and omega (rate k-dissipation)
|
#1 |
New Member
Luca
Join Date: Feb 2014
Posts: 19
Rep Power: 12 |
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 |
|
February 15, 2014, 11:30 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings Luca,
Two questions:
Bruno
__________________
|
|
February 15, 2014, 12:06 |
|
#3 |
New Member
Luca
Join Date: Feb 2014
Posts: 19
Rep Power: 12 |
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 ); // ************************************************************************* // Thanks |
|
February 15, 2014, 13:12 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
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:
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: http://www.cfd-online.com/Forums/ope...tml#post433597 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
__________________
|
|
February 15, 2014, 13:22 |
|
#5 |
New Member
Luca
Join Date: Feb 2014
Posts: 19
Rep Power: 12 |
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 |
|
|
|