|
[Sponsors] |
April 1, 2014, 14:32 |
Runtime sampling of line
|
#1 |
New Member
Steven
Join Date: Jan 2014
Posts: 14
Rep Power: 12 |
Hello openFoam community,
I have a problem that I am trying to solve with sampling of field variable over a line. What I would like to do is to add a piece of script into my controlDict so that I can obtain the sampled fields during runtime at the same interval as the timestep. I can easily use sampleDict and the command sample to do this after the simulation has finished but I would like to achieve a much higher sampling frequency than just the write output. At the bottom of my controlDict I have written: Code:
functions { WG9 { type sets; functionObjectLibs ("libsampling.so"); setFormat raw; interpolationScheme cell; outputControl timeStep; outputInterval 1; axis z; start (10.369 2.05 0); end (10.369 2.05 1.15); nPoints 100; fields (alpha1); } } Does anyone know if this is even possible what I am trying to accomplish? If so, do I appear to be missing something? Steven |
|
April 2, 2014, 22:31 |
|
#2 |
New Member
Steven
Join Date: Jan 2014
Posts: 14
Rep Power: 12 |
Hello all,
Just for reference I would like to post the solution I have found. Actually, it was someone elses solution I adapted to my own case (found here http://www.cfd-online.com/Forums/ope...ampledset.html), but it eluded me for a good few days. To sample a field along a user-specified line with an output frequency equal to the time step I added this to the bottom of my controlDict: Code:
functions { alpha1 //call this whatever you like { type sets; enabled true; verbose true; interpolationScheme cellPoint; outputControl timeStep; outputInterval 1; setFormat raw; fields (alpha1); //insert the fields you would like to sample sets ( WG9 //give the line a name. You can add more sample lines below this one { type uniform; axis z; start (10.369 2.05 0); end (10.369 2.05 1.15); nPoints 100; } ); } } Cheers, Steven |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] Problem with Gmsh | nishant_hull | OpenFOAM Meshing & Mesh Conversion | 23 | August 5, 2015 03:09 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 04:23 |
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 | flakid | OpenFOAM Installation | 16 | December 28, 2010 09:48 |
Regarding FoamX running Kindly help out | hariya03 | OpenFOAM Pre-Processing | 0 | April 18, 2008 05:26 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |