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

Dynamic mesh, interDymFoam : refinement on 2 fields

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 29, 2013, 17:07
Default Dynamic mesh, interDymFoam : refinement on 2 fields
  #1
New Member
 
tek
Join Date: Jul 2011
Posts: 8
Rep Power: 15
tek_cfd is on a distinguished road
Hi,
I would like to refine my mesh based on 2 fields variable (alpha1 and beta for example) at the same time using DynamicMeshDict how should I proceed.

....
dynamicRefineFvMeshCoeffs
{
// How often to refine
refineInterval 1;
// Field to be refinement on
field alpha1; // I would like to do it for beta at the same time as well!!
// Refine field inbetween lower..upper


....

Thanks very much in advance for any suggestion,
mt
tek_cfd is offline   Reply With Quote

Old   May 30, 2013, 04:07
Default
  #2
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi,

the most simple thing I can think of is creating a new field, let's call it "conditions" which can have value 1 if the conditions are fulfilled and 0 otherwise. After defining the "volScalarField conditions" in createFields.H you can access this new field from your solver. If you decide for example that alpha1 should be positive and beta negative:

Code:
conditions = pos(alpha1)*neg(beta);
which you can place in myInterDyMFoam.C. Then you can refine for values of "conditions" strictly greater than 0.

There is an option to include code on controlDict so it is compiled at runtime, I guess that you may place this code there instead of compiling a new solver. I've never used it, though, so I cannot help with that specifically.

Best,

Pablo
Phicau is offline   Reply With Quote

Reply

Tags
114, interdymfoam


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
Update of the variables after dynamic mesh motion. gtg258f OpenFOAM Programming & Development 9 January 18, 2014 11:08
dynamic mesh refinement and rhoCentralFoam ChrisA OpenFOAM Running, Solving & CFD 1 March 21, 2013 09:00
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 22:11
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 11 January 15, 2010 20:43
basic of mesh refinement arya CFX 4 June 19, 2007 13:21


All times are GMT -4. The time now is 15:17.