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

Adaptive mesh refinement

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 16, 2016, 09:50
Default Adaptive mesh refinement
  #1
New Member
 
Join Date: Nov 2010
Posts: 18
Rep Power: 16
smschnob is on a distinguished road
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
smschnob is offline   Reply With Quote

Old   November 16, 2016, 10:34
Default
  #2
New Member
 
Arne
Join Date: Oct 2013
Posts: 16
Rep Power: 13
Arne87 is on a distinguished road
At least with openFOAM 4 the CrankNicolson scheme seems to work if you switch off the subcycles for the alpha equation
Arne87 is offline   Reply With Quote

Old   November 17, 2016, 00:44
Default
  #3
New Member
 
Join Date: Nov 2010
Posts: 18
Rep Power: 16
smschnob is on a distinguished road
Thank you for your help. To switch off subcycles for alpha equation, I can just set nAlphaSubCycles in fvSolution to 0 correct?
smschnob is offline   Reply With Quote

Old   November 18, 2016, 09:54
Default update ...
  #4
New Member
 
Join Date: Nov 2010
Posts: 18
Rep Power: 16
smschnob is on a distinguished road
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.
Attached Images
File Type: jpg error.jpg (95.2 KB, 52 views)
smschnob is offline   Reply With Quote

Old   November 18, 2016, 12:14
Default
  #5
New Member
 
Arne
Join Date: Oct 2013
Posts: 16
Rep Power: 13
Arne87 is on a distinguished road
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.
Arne87 is offline   Reply With Quote

Old   November 18, 2016, 13:09
Default
  #6
New Member
 
Join Date: Nov 2010
Posts: 18
Rep Power: 16
smschnob is on a distinguished road
Any idea how to get interDyMFoam to use the right mesh?
smschnob is offline   Reply With Quote

Old   November 22, 2016, 10:38
Default
  #7
New Member
 
Join Date: Nov 2010
Posts: 18
Rep Power: 16
smschnob is on a distinguished road
I was able to restart using backward ddt scheme, just not Crank-Nicolson. Unfortunately backward scheme isn't in the more recent OpenFOAM versions.
smschnob is offline   Reply With Quote

Old   November 22, 2016, 18:09
Default
  #8
Member
 
Join Date: Nov 2009
Posts: 56
Rep Power: 17
fusij is on a distinguished road
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.
fusij is offline   Reply With Quote

Old   May 3, 2017, 12:05
Default
  #9
Member
 
Peter
Join Date: Nov 2015
Location: Hamburg, Germany
Posts: 57
Rep Power: 11
potentialFoam is on a distinguished road
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
potentialFoam is offline   Reply With Quote

Reply


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
[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


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