|
[Sponsors] |
August 4, 2018, 09:27 |
Adding new topoSetSourceType
|
#1 |
New Member
Paul
Join Date: Aug 2018
Posts: 1
Rep Power: 0 |
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 |
|
|
|
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 |