|
[Sponsors] |
November 16, 2016, 09:50 |
Adaptive mesh refinement
|
#1 |
New Member
Join Date: Nov 2010
Posts: 18
Rep Power: 16 |
Greetings everyone,
Does anyone know if a second order ddt scheme can be used with adaptive mesh refinement in interDyMFoam solver? I can only seem to get it to work with Euler. In particular, restarting a case with a second order ddt scheme is the problem. Tried in versions 2.3.0 and 3.0.1. Thanks! Scott |
|
November 16, 2016, 10:34 |
|
#2 |
New Member
Arne
Join Date: Oct 2013
Posts: 16
Rep Power: 13 |
At least with openFOAM 4 the CrankNicolson scheme seems to work if you switch off the subcycles for the alpha equation
|
|
November 17, 2016, 00:44 |
|
#3 |
New Member
Join Date: Nov 2010
Posts: 18
Rep Power: 16 |
Thank you for your help. To switch off subcycles for alpha equation, I can just set nAlphaSubCycles in fvSolution to 0 correct?
|
|
November 18, 2016, 09:54 |
update ...
|
#4 |
New Member
Join Date: Nov 2010
Posts: 18
Rep Power: 16 |
I took a step back and instead of trying to get my case to work with a second order ddt scheme, I tried to get the interDyMFoam damBreakWithObsticle tutorial to work with a second order scheme instead of Euler. I set nAlphaSubCycles to zero and ddt scheme to CrankNicolson 1.0. I ran the case to a time of 0.12 seconds. I was able to run the case initially without any problems. I then tried to restart the case from 0.12 seconds. However, I get an error message that 'size xx,xxx is not equal to the given value of xx,xxx'. Error is within the ddt0(rho,U) file. Please see attachment. I only get this error if I run for numerous timesteps before restarting. Has anybody else run into this issue or would be able to help me figure out what I'm doing wrong? Thanks.
|
|
November 18, 2016, 12:14 |
|
#5 |
New Member
Arne
Join Date: Oct 2013
Posts: 16
Rep Power: 13 |
At first I think I set the subCycles to 1 but I am not sure you can give it try and figure it out.
Secondly, the error message seems like openFOAM is restarting from the wrong mesh. You run your simulation the mesh gets refined and data files are written for the new mesh. When you are restarting foam probably tries to combine the new data files with the old mesh. Make sure to combine the right mesh with the right data files. |
|
November 18, 2016, 13:09 |
|
#6 |
New Member
Join Date: Nov 2010
Posts: 18
Rep Power: 16 |
Any idea how to get interDyMFoam to use the right mesh?
|
|
November 22, 2016, 10:38 |
|
#7 |
New Member
Join Date: Nov 2010
Posts: 18
Rep Power: 16 |
I was able to restart using backward ddt scheme, just not Crank-Nicolson. Unfortunately backward scheme isn't in the more recent OpenFOAM versions.
|
|
November 22, 2016, 18:09 |
|
#8 |
Member
Join Date: Nov 2009
Posts: 56
Rep Power: 17 |
Maybe for the Crank-Nicholson it can not sum the terms from previous and current timestep since due to the mesh refinement, the mesh size has changed between timesteps.
Like we know, Crank-Nicholson approximates the time derivative with contributions from both timesteps. |
|
May 3, 2017, 12:05 |
|
#9 |
Member
Peter
Join Date: Nov 2015
Location: Hamburg, Germany
Posts: 57
Rep Power: 11 |
Dear Foamers,
I have another issue using the utility 'extrudeMesh' (foam version 1606+ or 4.1): Using Snappy works fine for dynamic mesh refinement (or adaptive mesh refinement, AMR), like here http://www.openfoam.com/version-v1606+/meshing.php The problem occurs if 'extrudeMesh' is used after using Snappy - all cells with a hanging node will become protected from refinement. I prepared a simple case to demonstrate this problem. This case is based on the tutorial Code: $FOAM_TUTORIALS/multiphase/interDyMFoam/ras/motorBike in version 1606 (see link above). It also works with version 4.1. This case can be downloaded here: https://www.dropbox.com/s/3g40075603...rBike.zip?dl=0 Two figures illustrate this problem. The grey colored cells show the 'protectedCells' which cannot be refined. Firstly, this result is gained for the standard tutorial case: Secondly, the following figure shows the result after 'extrudeMesh' was used: Three scripts lead to different results: - 'runscript_likeTutorial': creates more or less the tutorial case (corresponds to the first figure). - 'runscript_extrude1/2': uses 'extrudeMesh' in two different ways (lead to second figure). Question: How can you use 'extrudeMesh' and dynamic mesh refinement together? Best Regards, Peter Details: 1.) One problem is that the fields cellLevel and pointLevel in the directory constant/polyMesh need to be deleted for 'interDyMFoam'. In 'runscript_extrude1' they are deleted, in 'runscript_extrude2' the cellLevel field is kind of reconstructed with the 'refinementLevel'-utility. Both do not work (-> many protected cells) REMARK: Same question asked here: extrudeMesh |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] problems generating clean mesh | Christian_tt | OpenFOAM Meshing & Mesh Conversion | 2 | June 20, 2019 06:39 |
[snappyHexMesh] SnappyHexMesh for internal Flow | vishwa | OpenFOAM Meshing & Mesh Conversion | 24 | June 27, 2016 09:54 |
[snappyHexMesh] SHM problem : KVLCC2 with appendage mesh | sc.park | OpenFOAM Meshing & Mesh Conversion | 1 | March 13, 2016 14:28 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
killed "snappyHexMesh" | parkh32 | OpenFOAM Pre-Processing | 2 | April 8, 2012 18:12 |