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

Creating field of strings with "mesh-structure"

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 13, 2014, 05:03
Default Creating field of strings with "mesh-structure"
  #1
Senior Member
 
Join Date: Jan 2012
Posts: 166
Rep Power: 14
maybee is on a distinguished road
hi,

I need to create a field that consists of a function (string) for each cell of the current geometry like of type

Code:
GeometricField<string, fvPatchField, volMesh>
.

The field should have the structure of the current mesh. Is this possible and how would I do it?
I've read about the classes "geometricField" and "dimensionedField", but I am not sure if it s possible and how to do it.

Last edited by maybee; February 13, 2014 at 06:46.
maybee is offline   Reply With Quote

Old   February 13, 2014, 13:49
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Maybee,

It sounds a bit weird, because I am pretty sure that the boundary field is not defined for strings. Do something along the following lines:

Code:
List<string> stringField(mesh.C().internalField().size());

forAll (stringField, stringi)
{
    // Populate with correct string
}
Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   February 14, 2014, 09:49
Default
  #3
Senior Member
 
Join Date: Jan 2012
Posts: 166
Rep Power: 14
maybee is on a distinguished road
Hi,

thx for the answer - i will check this later when I have to implement this into my code.
maybee is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 17:51
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 14:37
Creating a mesh of the flow field in GAMBIT Vidya Raja FLUENT 0 October 3, 2005 09:53


All times are GMT -4. The time now is 08:17.