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

Why is "fluxRequired" run time selectable?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 11, 2012, 21:18
Question Why is "fluxRequired" run time selectable?
  #1
New Member
 
Brian
Join Date: Oct 2012
Posts: 6
Rep Power: 14
koad is on a distinguished road
I have been using OpenFOAM for a few months now and have found the "flux" method for fvMatrix equations useful. And I understand that to use "flux" I have to list the fields for which the flux is to be generated in the "fluxRequired" subdictionary of the fvSchemes. And I understand that it costs CPU time to calculate the fluxes, so that you might only want to calculate it for certain fields.

What I don't understand is why fluxRequired is run time selectable. If the "flux" method is used in the code to get the flux for a field, say "p", the code will crash if "p" is not listed in the fluxRequired subdictionary. So there is nothing to select. Either "p" is listed under fluxRequired and the code runs, or "p" is missing and the code crashes. There doesn't seem to be any other options. So why make it run time selectable?

It seems to me that the "fluxRequired" variable ought to be set in the code, perhaps when the field is created, rather than in the fvSchemes file. Is there any way to do this?

Thanks for the help!
koad is offline   Reply With Quote

Old   November 22, 2012, 09:47
Default
  #2
Member
 
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 93
Rep Power: 17
sylvester is on a distinguished road
Hi Brian,

I agree. This construct has never seen sensible to me.

Sylvester

Quote:
Originally Posted by koad View Post
I have been using OpenFOAM for a few months now and have found the "flux" method for fvMatrix equations useful. And I understand that to use "flux" I have to list the fields for which the flux is to be generated in the "fluxRequired" subdictionary of the fvSchemes. And I understand that it costs CPU time to calculate the fluxes, so that you might only want to calculate it for certain fields.

What I don't understand is why fluxRequired is run time selectable. If the "flux" method is used in the code to get the flux for a field, say "p", the code will crash if "p" is not listed in the fluxRequired subdictionary. So there is nothing to select. Either "p" is listed under fluxRequired and the code runs, or "p" is missing and the code crashes. There doesn't seem to be any other options. So why make it run time selectable?

It seems to me that the "fluxRequired" variable ought to be set in the code, perhaps when the field is created, rather than in the fvSchemes file. Is there any way to do this?

Thanks for the help!
sylvester is offline   Reply With Quote

Reply

Tags
fluxrequired, hardcode, run time, selectable


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
Run time Selection Mechanism - Some help required to understand jaswi OpenFOAM Programming & Development 3 October 29, 2015 14:42
batch command to run fluent from nth time step solomon FLUENT 13 August 25, 2015 21:05
InterFoam negative alpha karasa03 OpenFOAM 7 December 12, 2013 04:41
Choosing the apt time step size for a transient run saisanthoshm88 CFX 1 March 31, 2012 17:11
Estimating 3d run time from 2d run time. Sam Main CFD Forum 2 February 10, 2009 13:42


All times are GMT -4. The time now is 11:36.