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

Initialize a volScalarFiedl with wordList of patch types

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 9, 2011, 09:34
Default Initialize a volScalarFiedl with wordList of patch types
  #1
New Member
 
Thijs Gillebaart
Join Date: Oct 2010
Location: Delft
Posts: 2
Rep Power: 0
tgillebaart is on a distinguished road
Hi everyone,

Since a couple of months I'm using openfoam-1.5-dev for my master thesis. At this moment I'm working on a utility to write out the skewness and nonOrthogonality fields of the complete mesh. This also includes the face skewness and nonOrthogonality of the boundaries. When looking at the possible constructures of volScalarField (which is a "GeometricField<scalar, fvPatchField, volMesh>") there is the following possibility:

GeometricField
(
const IOobject & io,
const Mesh & mesh,
const dimensionSet & ds,
const wordList & patchFieldTypes
)

It looks like the last argument can be used to specifiy the patchTypes. For my output fields I would like to be able to assign a nonUniform list to each the patches independent of the types read from the mesh. However the type should be equal to "calculated", otherwise the assignment does not work. No error will be given during compilation or running but the field values for patches with e.g. symmetryPlane are not stated in the file.

When I give a wordList in the constructor with only calculated it does not assign it to the patches. I checked this by looking in the file, but also by printing out volScalarField.boundaryField().types() right after the constructor. Here the patch types have not changed. My constructor looks as follows:

volScalarField skewnessIO //Create IO field for absolute skewness
(
IOobject
(
"skewness",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(0,0,0,0,0,0,0), 0.0),
typeList
);

Can anyone explain me what I'm doing wrong? Is the constructor with the wordList not meant for what I'm doing?

Regards,

Thijs

Last edited by tgillebaart; February 10, 2011 at 08:27.
tgillebaart 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using starToFoam clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 04:04
StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 05:38
CheckMeshbs errors ivanyao OpenFOAM Running, Solving & CFD 2 March 11, 2009 03:34
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


All times are GMT -4. The time now is 01:05.