|
[Sponsors] |
November 27, 2014, 20:58 |
sampleDict for streamFunction
|
#1 |
New Member
Sri
Join Date: Nov 2012
Posts: 10
Rep Power: 13 |
Hello,
I am trying to write out stream function values on a 2-d surface. Once the case is done running, I invoke the streamFunction utility. I make sure that the streamFunction file exists in each time directory. Then I invoke the sample utility. The sampleDict is given here. (I got rid of the headers here) surfaceFormat vtk; interpolationScheme cellPoint; surfaces ( testplane { type plane; basePoint (0 0 0.001); normalVector (0 0 1); } ); fields ( streamFunction ); After the sample utility is run, the post-processing/surface/time folders show up, but there are no files inside the time directories. Is the "streamFunction" field recognized by the sample utility? If I replace streamFunction with U, p etc, they work. Thanks, Srivathsan |
|
November 28, 2014, 02:44 |
|
#2 |
Senior Member
|
Hi,
streamFunction utility creates pointScalarField (while p is volScalarField). While sample utility can't sample these kind of fields Once I've made streamFunctionV (https://bitbucket.org/mrklein/streamfunctionv) which first creates pointScalarField and then interpolates point values into cell values. Basically it's streamFunction with the following addition: Code:
streamFunctionV = dimensionedScalar("zero", phi.dimensions(), 0.0); weight = 0.0; const labelListList& cellPoints = streamFunctionV.mesh().cellPoints(); forAll(streamFunctionV, cellI) { const labelList& curCellPoints = cellPoints[cellI]; forAll(curCellPoints, cellPointI) { streamFunctionV[cellI] += streamFunction[curCellPoints[cellPointI]]; weight[cellI] += 1.0; } } streamFunctionV /= (weight + 1.0); streamFunctionV.boundaryField() = 0.0; streamFunctionV.write(); Last edited by alexeym; November 28, 2014 at 02:45. Reason: typo |
|
November 28, 2014, 08:54 |
|
#3 |
New Member
Sri
Join Date: Nov 2012
Posts: 10
Rep Power: 13 |
Thank you for your quick reply. I will try this and let you know.
Sri |
|
November 30, 2014, 10:53 |
|
#4 |
New Member
Sri
Join Date: Nov 2012
Posts: 10
Rep Power: 13 |
This idea works the way I want it to.
Thank you very much. |
|
Tags |
sample postprocessing |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sampleDict and controlDict | musahossein | OpenFOAM Post-Processing | 39 | July 17, 2016 11:00 |
controlDict and sampleDict giving different results | Shenan | OpenFOAM Post-Processing | 2 | November 15, 2014 11:15 |
Question on sampleDict | musahossein | OpenFOAM Running, Solving & CFD | 8 | May 8, 2013 18:48 |
sampleDict keyword patchName not accepted | musahossein | OpenFOAM Bugs | 6 | January 28, 2013 01:48 |
sampleDict Bug | musahossein | OpenFOAM Bugs | 7 | December 12, 2011 13:45 |