CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

How to use both 1st and 2nd order schemes for the div(phi,U) term?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 27, 2016, 10:21
Default How to use both 1st and 2nd order schemes for the div(phi,U) term?
  #1
Member
 
Jack
Join Date: Dec 2011
Posts: 81
Rep Power: 6
ripperjack is on a distinguished road
Hi guys,

I would like to calculate the div(phi,U) term using both 1st order scheme (i.e., Gauss upwind) and 2nd order scheme (i.e., Gauss linear) in my simulation. I know that I can define separate fields such as phi_2nd and U_2nd, and phi_1st and U_1st, and then I can set the numerical schemes for these fields separately. But if I do it this way, the memory usage will be doubled. Is there a convenient way I can do it without defining new fields? Thank you guys in advance!

Best regards,
Jack
ripperjack is offline   Reply With Quote

Old   July 27, 2016, 16:30
Default
  #2
Member
 
Jack
Join Date: Dec 2011
Posts: 81
Rep Power: 6
ripperjack is on a distinguished road
Quote:
Originally Posted by ripperjack View Post
Hi guys,

I would like to calculate the div(phi,U) term using both 1st order scheme (i.e., Gauss upwind) and 2nd order scheme (i.e., Gauss linear) in my simulation. I know that I can define separate fields such as phi_2nd and U_2nd, and phi_1st and U_1st, and then I can set the numerical schemes for these fields separately. But if I do it this way, the memory usage will be doubled. Is there a convenient way I can do it without defining new fields? Thank you guys in advance!

Best regards,
Jack
Hi guys,

I am very close to getting this fixed. I can read and modify the fvScheme IOdictionary at run time. However, even I change the divscheme of div(phi,U) from Gauss linear to Gauss upwind, the results do not change... I think I need to call a function to let fvc::div know that I want to use the updated div scheme. Any ideas? Thanks!

Regards,
Jack
ripperjack is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
1st or 2nd order gradients approach? fireflies Main CFD Forum 2 September 18, 2014 08:07
side jet modeling for a missile: 1st order or 2nd order scheme AmirBaqa1987 ANSYS 1 March 19, 2014 05:39
1st order vs 2nd order ken FLUENT 8 March 14, 2013 04:43
2nd order schemes only 1st order accurate? ThinkQuick Main CFD Forum 3 September 11, 2012 05:16
1st order temporal & 2nd order spatial Prateep Chatterjee FLUENT 0 January 19, 2003 01:31


All times are GMT -4. The time now is 23:08.