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

Using codeStream with fvSchemes?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Tobi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 7, 2022, 03:42
Default Using codeStream with fvSchemes?
  #1
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 47
Rep Power: 7
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, 12:36
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,716
Blog Entries: 6
Rep Power: 53
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, 23:29
Default
  #3
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 47
Rep Power: 7
jnanabrao is on a distinguished road
Exactly what I was looking for! Thanks a lot Tobi.
jnanabrao is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


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