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

How to refine mesh based on courant number

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 17, 2023, 12:08
Default How to refine mesh based on courant number
  #1
New Member
 
Huang
Join Date: Feb 2023
Posts: 4
Rep Power: 3
huangyuhui723 is on a distinguished road
I want to refine the mesh use dynamicRefineFvMesh in dynamicMeshDict, but I don't know how to define the scalar filed of courant number(Co) in controlDict, can you tell me how can I do this? Thanks very much!
huangyuhui723 is offline   Reply With Quote

Old   April 17, 2023, 12:14
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,177
Rep Power: 27
Yann will become famous soon enough
Hello,

This might help you: https://www.openfoam.com/documentati...CourantNo.html

Cheers
Yann
Yann is offline   Reply With Quote

Old   April 18, 2023, 09:29
Default
  #3
New Member
 
Huang
Join Date: Feb 2023
Posts: 4
Rep Power: 3
huangyuhui723 is on a distinguished road
Thank you very much for your reply, I am referring to this page to modify the program. There are still some problems, and I am trying to solve
huangyuhui723 is offline   Reply With Quote

Old   April 18, 2023, 10:58
Default
  #4
New Member
 
Huang
Join Date: Feb 2023
Posts: 4
Rep Power: 3
huangyuhui723 is on a distinguished road
I initially implemented this feature, by setting the functions in controlDict as follow:

functions
{
Co1
{
// Mandatory entries (unmodifiable)
type CourantNo;
libs ("libfieldFunctionObjects.so");
rho rho;
writeControl adjustableRunTime;
writeInterval 1e5;//Do not output the Courant number during the calculation
}
}

And then set the "filed" in dynamicMeshDict as "Co".
huangyuhui723 is offline   Reply With Quote

Reply

Tags
courant number, function object, refine mesh


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
Decomposing meshes Tobi OpenFOAM Pre-Processing 22 February 24, 2023 09:23
[snappyHexMesh] snappyHexMesh stuck when snap is turned on yukuns OpenFOAM Meshing & Mesh Conversion 3 February 2, 2021 13:05
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 11 January 15, 2010 19:43
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 18:07
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15


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