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

Adding new topoSetSourceType

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   August 4, 2018, 09:27
Default Adding new topoSetSourceType
  #1
New Member
 
Paul
Join Date: Aug 2018
Posts: 1
Rep Power: 0
mpgfritze is on a distinguished road
Hi,

I would like to expand the setFields utility to fit my needs.
The field K of my 2D-Mesh needs to be filled a certain way. For example: Cell 0-199, 400-599 and 800-999 of my mesh consisting of 1000 Cells need to be filled with the fieldValues given in the SetFieldsDict.

It works using labelToCell in the dictionary and writing explicitly a labelList consisting of 600 labels. To simplify this, i would like to only give some parameters and fieldValues in the setFieldsDict.

So far i was able to copy setFields, rename it and using it with the new mySetFieldsDict. After some hours of trying to understand the sourcecode of setFields, topoSetSource and labelToCell i figured i needed to make my own topoSetSourceType like myLabelToCell and don't need to change anything in setFields. Inside the myLabelToCell.C i should be able to access data from the dict and set up the custom labelList.

My question is how is that possible? Does it work the same way as copying, renaming and compiling utilities like setFields? But as there is Make folder how do i compile it?

I'm quite new to OpenFOAM programming, so I'd be really happy to get some advice from you or sources where I can learn some more.

Or maybe there is even a much simpler way to do it...and I'm thinking way to complicated.

-Paul
mpgfritze is offline   Reply With Quote

 


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
How I can introduce my power heat (W) in chtMultiRegionFoam? aminem OpenFOAM Pre-Processing 32 August 29, 2019 02:23
chtMultiRegionSimpleFoam: crash on parallel run student666 OpenFOAM Running, Solving & CFD 3 April 20, 2017 11:05
conjugateHeatFoam + interFoam farhagim OpenFOAM Programming & Development 15 July 19, 2016 07:55
chtMultiRegionSimpleFoam 3D problem Lucie OpenFOAM Pre-Processing 2 June 21, 2016 05:23
chtMultiRegionSimpleFoam samiam1000 OpenFOAM Running, Solving & CFD 39 March 31, 2016 08:43


All times are GMT -4. The time now is 00:34.