CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

fvOptions in parallel or alternative function/solver

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By LuckyTran

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 22, 2021, 10:58
Default fvOptions in parallel or alternative function/solver
  #1
New Member
 
George
Join Date: Oct 2020
Posts: 24
Rep Power: 5
Dicanic is on a distinguished road
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!
Dicanic is offline   Reply With Quote

Old   November 22, 2021, 12:12
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,674
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
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
Dicanic likes this.
LuckyTran is offline   Reply With Quote

Old   November 22, 2021, 14:50
Default
  #3
New Member
 
George
Join Date: Oct 2020
Posts: 24
Rep Power: 5
Dicanic is on a distinguished road
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?
Dicanic is offline   Reply With Quote

Reply

Tags
fvmodels, fvoptions, heat source


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
User fortran to input/output file in a parallel run doublestrong CFX 5 March 31, 2017 08:15
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 18:45
Any Parallel install procedure on Mac OS JinZhiyi SU2 Installation 2 March 11, 2014 01:12
simpleFoam in parallel issue plucas OpenFOAM Running, Solving & CFD 3 July 17, 2013 11:30
Parallel Computing Classes at San Diego Supercomputer Center Jan. 20-22 Amitava Majumdar Main CFD Forum 0 January 5, 1999 12:00


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