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

[Other] Adaptive mesh refinement - unbounded above on a scalar field

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 19, 2018, 07:48
Default Adaptive mesh refinement - unbounded above on a scalar field
  #1
TCS
New Member
 
Thomas C. Sykes
Join Date: Jul 2017
Location: University of Leeds, UK
Posts: 11
Rep Power: 9
TCS is on a distinguished road
Hi everyone, I'm looking to use the interDyMFoam solver (OF Foundation 4.1).

I have a droplet defined by the volume fraction (alpha), and I want to refine both around the droplet's interface and everywhere inside. That is, I want to refine where alpha>0.01 and not coarsen for any value above 0.01 (unbounded above).

So in the end, outside the droplet should have the original mesh, which changes (adaptively) across the interface, with the mesh inside the droplet (where alpha is around 1) having the same refinement as the interface.

Does anyone know if this is possible?
TCS is offline   Reply With Quote

Old   July 19, 2018, 08:39
Default
  #2
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Hi!


What if you set:
lowerRefineLevel 0.001;
upperRefineLevel 5; // max should be 1 but to be sure.


It will refine if
0.001 < alpha.water < 5, so if alpha.water > 0.001
simrego is offline   Reply With Quote

Old   July 19, 2018, 08:47
Default
  #3
TCS
New Member
 
Thomas C. Sykes
Join Date: Jul 2017
Location: University of Leeds, UK
Posts: 11
Rep Power: 9
TCS is on a distinguished road
Quote:
Originally Posted by simrego View Post
Hi!


What if you set:
lowerRefineLevel 0.001;
upperRefineLevel 5; // max should be 1 but to be sure.


It will refine if
0.001 < alpha.water < 5, so if alpha.water > 0.001
Hi simrego, thanks for the suggestion. I tried that and it gave me the following error which I don't understand how to deal with.

Code:
PIMPLE: iteration 1
Selected 364 cells for refinement out of 2268.
Refined from 2268 to 4816 cells.
Selected 0 split points out of a possible 364.
Execution time for mesh.update() = 0.02 s
DICPCG:  Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
smoothSolver:  Solving for alpha.water, Initial residual = 0, Final residual = 0, No Iterations 0
Phase-1 volume fraction = 0.130194  Min(alpha.water) = 0  Max(alpha.water) = 1
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.130194  Min(alpha.water) = 0  Max(alpha.water) = 1
DICPCG:  Solving for p_rgh, Initial residual = 1, Final residual = 0.0265856, No Iterations 2
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib64/libc.so.6"
#3  ? at tensorField.C:?
#4  ? at ??:?
#5  ? at ??:?
#6  ? at ??:?
#7  __libc_start_main in "/lib64/libc.so.6"
#8  ? at ??:?
Floating point exception (core dumped)
TCS is offline   Reply With Quote

Old   July 19, 2018, 09:14
Default
  #4
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
There might be some other problems I think. Maybe your initial mesh is too coarse. But i'm just guessing. If it is the original dynamicRefineFvMesh (if you made no modifications in it), it should works like this without problems.
simrego is offline   Reply With Quote

Old   July 19, 2018, 13:11
Default
  #5
TCS
New Member
 
Thomas C. Sykes
Join Date: Jul 2017
Location: University of Leeds, UK
Posts: 11
Rep Power: 9
TCS is on a distinguished road
Quote:
Originally Posted by simrego View Post
There might be some other problems I think. Maybe your initial mesh is too coarse. But i'm just guessing. If it is the original dynamicRefineFvMesh (if you made no modifications in it), it should works like this without problems.
There was something else. My alpha=1 region was initialised such that it was in a corner of two boundaries (walls - same or separate patches, the same thing happens). If I initialise in contact with a single boundary, or free, it works fine.

Maybe this is an issue with how dynamicRefineFvMesh works?
TCS is offline   Reply With Quote

Old   July 19, 2018, 14:10
Default
  #6
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
I'm not sure if i understand your problem, but if you check the damBreakWithObstacle case, the alpha=1 field is also initialized in a corner and works fine.
simrego is offline   Reply With Quote

Reply

Tags
adaptive mesh refinement, interdymfoam, multiphase, openfoam 4.1


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
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! divergence OpenFOAM Meshing & Mesh Conversion 0 January 23, 2019 05:17
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
Mesh gets out of sync during parallel 2D adaptive mesh refinement pjohannes183 OpenFOAM Programming & Development 0 November 14, 2013 05:31
[snappyHexMesh] Adding layers goes wrong with SnappyHexMesh Elise OpenFOAM Meshing & Mesh Conversion 1 April 22, 2013 03:32


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