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

Using codeStream with fvSchemes?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Tobi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 7, 2022, 02:42
Default Using codeStream with fvSchemes?
  #1
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
Dear Foamers,


Is it possible to have a conditional entry for a divergence scheme based on Courant number?


For example is something like this entry possible?


Quote:
divSchemes
{
default Gauss linear;
div(phi,e) #codeStream{
codeInclude
#{
#include "fvCFD.H"
.....
//other necessary compilation files

#};

code #{
word scheme("Gauss linear");
if (maxCo > 0.9)
scheme = "Gauss MUSCL"
os << scheme;
};
};
}

Thanks in advance for your time,
JBR
jnanabrao is offline   Reply With Quote

Old   January 14, 2022, 11:36
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Yes. The CoBlended scheme allows you to specify switching numerical schemes based on the Courant Number... and a linear blending in between.



https://www.openfoam.com/documentati...coblended.html
jnanabrao likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 14, 2022, 22:29
Default
  #3
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
Exactly what I was looking for! Thanks a lot Tobi.
jnanabrao is offline   Reply With Quote

Reply


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
OF9, Error after #codeStream internalField Dicanic Main CFD Forum 16 August 22, 2023 13:37
PROBLEMS DEFINING A LIST USING #CODESTREAM !! Help please !! angatri_14 OpenFOAM Programming & Development 1 August 21, 2020 17:16
time dependent gravity based on codeStream OF v18 Ali Blues OpenFOAM Running, Solving & CFD 6 May 13, 2019 17:06
Read .csv ffile in codeStream Akshay_11235 OpenFOAM Running, Solving & CFD 0 December 22, 2018 19:02
How to create the internalField with #codeStream chun OpenFOAM Running, Solving & CFD 3 May 6, 2017 10:35


All times are GMT -4. The time now is 21:16.