|
[Sponsors] |
fvOptions in parallel or alternative function/solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 22, 2021, 11:58 |
fvOptions in parallel or alternative function/solver
|
#1 |
New Member
George
Join Date: Oct 2020
Posts: 24
Rep Power: 6 |
Hi all,
I have an interesting case where I have a temperature dependent heat source. The heat source is dependent on the average temperature of a cellzone or set of cells and the power source change is significant and depends on the last time (dt) and power as well. I tried using fvOptions to simply take the average and write it out to a text file to read in on the next timestep, However, when I run fvOptions in parallel, I realize it is only doing this for the average of the partitioned mesh and not the whole set of cells. So here are a few questions that I have: Can I reference cells in fvOptions that aren't in the decomposed section? What order are functions (which I believe I can reference the whole mesh or just cellzones) executed, before or after fvOptions? Also any reference or guide on how to write a function would be very helpful. Worse comes to worse, can I write a custom solver that would accomplish this and have an input dictionary specify the cellzone/cellset of interest? I am able to work with any version of OpenFOAM, but my first few attempts were on of8. If there is an easier way to do this on of-2106 or of9, I would like to try it. Any help is appreciated, thank you! |
|
November 22, 2021, 13:12 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,751
Rep Power: 66 |
Yes you can stream info across processes, but that's not the issue. You can see the order of events by simply opening your solver.C file.
The average over all cells in a cellset can be done via a field function object and nestled neatly in your controlDict. Few situations require writing your own solver.: if you have a radically different equation you want to solve or if you need to do some heavy duty processing that needs extra fields to be registered in createFields.H |
|
November 22, 2021, 15:50 |
|
#3 |
New Member
George
Join Date: Oct 2020
Posts: 24
Rep Power: 6 |
I guess my understanding of the source code is still not great. I have used volFieldValue before, how would I access the averages from fvOptions. Besides writing out to a new file and reading into that file, is there a better way for fvOptions to access data from a function?
|
|
Tags |
fvmodels, fvoptions, heat source |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
User fortran to input/output file in a parallel run | doublestrong | CFX | 5 | March 31, 2017 09:15 |
simpleFoam parallel | AndrewMortimer | OpenFOAM Running, Solving & CFD | 12 | August 7, 2015 19:45 |
Any Parallel install procedure on Mac OS | JinZhiyi | SU2 Installation | 2 | March 11, 2014 02:12 |
simpleFoam in parallel issue | plucas | OpenFOAM Running, Solving & CFD | 3 | July 17, 2013 12:30 |
Parallel Computing Classes at San Diego Supercomputer Center Jan. 20-22 | Amitava Majumdar | Main CFD Forum | 0 | January 5, 1999 13:00 |