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

[Other] How can I deform a mesh with my own program? Currently getting continuity errors!

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 23, 2013, 05:00
Default How can I deform a mesh with my own program? Currently getting continuity errors!
  #1
New Member
 
Join Date: Jul 2011
Posts: 5
Rep Power: 14
clarence_carter is on a distinguished road
I have written a program that deforms a mesh by reading in the points file, applying an algebraic deformation of the points, and then replacing the original points file with a new one.

Unfortunately, although I can generate a mesh in this way, postprocess it and view it in paraview, OpenFOAM (interFoam) does not run when using the deformed mesh. Instead, I get this error:

----------------------------------------------------------------------------------
cfdTools/general/adjustPhi/adjustPhi.C[34] [50] [39] at line Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux : 72466.1
Specified mass inflow : 992.137
Specified mass outflow : 992.137
Adjustable mass outflow : 4.64372e-11
----------------------------------------------------------------------------------

This is using boundary conditions that work perfectly well with a non-deformed mesh.

I was initially concerned that the deformation was not being performed to a high enough accuracy (my first attempt was with Python), so I re-wrote the program using C++ in double precision, but I still get the same error.

What am I doing wrong?

From analysing the polyMesh structure, the only coordinate information seems to be stored in the points file; everything else appears to be derived from the points file, so this is the only file I have modified. Am I missing something, is there some other file I need to modify?

If anybody has formation or advice to share regarding this problem I will be extremely grateful!
clarence_carter is offline   Reply With Quote

Old   April 23, 2013, 05:31
Default
  #2
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi

it seems that you are starting off the previous results. Your case is most probably blowing up because your fluxes were calculated to fulfil mass conservation for the previous mesh. Now, with the deformed one, your face areas have changed, and therefore you are having mass discontinuities in some cells.

My guess is that you could try to start this case from 0 or (less advised) delete the phi field on your initial folder and see what happens...

Another option is that your topology may be screwed up due to the movement of the points (e.g. twisted faces). If you have tried checkMesh and it is OK, then do not worry for this.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   April 23, 2013, 08:13
Default
  #3
New Member
 
Join Date: Jul 2011
Posts: 5
Rep Power: 14
clarence_carter is on a distinguished road
Thanks for your very fast reply!

Unfortunately I don't think your first suggestion is the answer. I am deforming the mesh before I even run the case, so phi has not been calculated yet.

I have had a look at the checkMesh output and it seems to be reporting a lot of non-orthogonal cells. This is surprising, since the mesh is hexahedral (computed via blockMesh) and the deformation is normal to the hexahedra surface (i.e. in the X-direction).

I will keep thinking on it.
clarence_carter is offline   Reply With Quote

Reply

Tags
meshing, openfoam, programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
How to use PIMPLE properly? floquation OpenFOAM Running, Solving & CFD 25 December 2, 2021 10:40
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 14:58
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 04:34
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09


All times are GMT -4. The time now is 08:26.