Topology-Changing with movingConeTopo
Hello Open-Foam-Users,
I am trying to simulate a moving box in a box with cell layer addition/removing. Therefore i began with the movingComeTopo-tutorial, which uses the movingConeTopoFvMesh for mesh-movement and manipulation. The tutorial runs, but when im trying to replace the tutorial-mesh (and the boundaries, of course) with my Salome-made unv-mesh (ideasUnvtoFoam) i get that error: Code:
Mesh modifiers not read properly#0 Foam::error::printStack(Foam::Ostream&) in "/home/michael/OpenFOAM/OpenFOAM-1.5-dev/lib/linuxGccDPOpt/libOpenFOAM.so" This leeds to the following questions: What is that variable for? (my C++ knowledge = bad) Why is its size zero for my Mesh? Is there maybe anything wrong with the ideasUnvToFoam-tool, although the generated files for points, faces,.. look exactly like the one made with blockMesh. Maybe some of you know whats going wrong. Thank you all for reading this! Michael |
hi michael,
please delete all *Zones in $FOAM_CASE/constant/polymesh and then run the app again. Christof |
Hi christoph,
thank you very much for your advice! There was a faceZones-file I deleted now, but another error follows: Code:
[...] PS: this error produces the empty faceZones-file, which leads to error I posted above. Michael |
The error is clear....your zones are both zero. So the lib cant add layer-meshmodifier. I think there is somethink wrong with your case setup. Maybe the min/max thickness values? It is possible to upload your case?
Christof (note the "f" at the end ;) ) |
Hi Christof (sorry about the ph ;)),
here is the upload (32mb, with mesh): http://rapidshare.com/files/28613086...sh.tar.gz.html Note that this mesh was originally written for movement in y-direction. I read that movingConeTopo is written for movement in x-direction, so I changed my movement to x-direction, although the movement itself makes no sense for now. If I see the first cell layer being deteted and another being added, I will transform the mesh immediately. ;) Edit: The Mesh is hex with 0.25 cell-size everywhere in every dimension (easy setup for the first). Thickness is for left and right defined as 0.125=min and 0.75=max. |
Hi Michael,
i looked through your case and to the code of movingConeTopoFvMesh. The faceZones are 0 because the if condition is false. (Have a look at line 125 of movingConeTopoFvMesh.C) This lib is exlusive for similar cases like the tutorial case. I think you have to modify the lib. Have a nice day, Christof |
Hi christof,
your hint was absolutely correct! Many, many thanks! ;) Defining that obstacle edges in the dynamicMeshDict and(!) in the code doesnt make sense to me, but however: the calculation starts now :) But there must be other tutorial-specific variables in the code, because the calculation aborts when topology-change is done (the solver claims zero-volume-elements in layerAdditionRemoval.C line 208). That does not surprise me, because the solver ignores the specified minThickness and maxThickness values and compresses the cells until they reach zero-volume. Maybe the (really small) thickness values of the tutorial are still somewhere implemented. |
Hi,
the solver looks into the dictionary for min and max thickness. Maybe your setup is bad. Play a bit with these values and have fun. Nice day, Christof. |
Doing something similar, here are my changes to movingConeTopoFvMesh.H:
Code:
27c27 My difficulty is in trying to get OpenFOAM to recognize this new puffValveTopoFvMesh as a valid dynamicFvMesh type. I'm not sure if this means that it's an "application" or a "library". I tried to adapt the dynamicMesh/topoChangerFvMesh/Make entries as follows: files: Code:
puffValveTopoFvMesh.C Code:
EXE_INC = \ Code:
g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam16x/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude -I/opt/openfoam16x/OpenFOAM-1.6-ext/src/dynamicMesh/dynamicFvMesh/lnInclude -I/opt/openfoam16x/OpenFOAM-1.6-ext/src/dynamicMesh/dynamicMesh/lnInclude -I/opt/openfoam16x/OpenFOAM-1.6-ext/src/meshTools/lnInclude -I/opt/openfoam16x/OpenFOAM-1.6-ext/src/dynamicMesh/meshMotion/tetDecompositionMotionSolver/lnInclude -I/opt/openfoam16x/OpenFOAM-1.6-ext/src/tetDecompositionFiniteElement/lnInclude -I/opt/openfoam16x/OpenFOAM-1.6-ext/src/dynamicMesh/topoChangerFvMesh/lnInclude -DFACE_DECOMP -IlnInclude -I. -I/opt/openfoam16x/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude -I/opt/openfoam16x/OpenFOAM-1.6-ext/src/OSspecific/POSIX/lnInclude -fPIC Make/linuxGccDPOpt/puffValveTopoFvMesh.o -L/opt/openfoam16x/OpenFOAM-1.6-ext/lib/linuxGccDPOpt \ Any ideas? Thanks. |
Sarah,
Make your own class that derives from topoChangerFvMesh (take a cue from any of the other solvers, like mixerFvMesh, for example), put it in its own sub-directory (like puffValveTopoFvMesh/puffValveTopoFvMesh.C), and add an entry to Make/files in the topoChangerFvMesh folder. Also, use 'wmake libso' to make a library (as opposed to 'wmake', which makes an application instead) You would also want to change the TypeName entry in your header file as well, since that entry is used for run-time selection |
Okay, I think I got that sorted out. Here's the resulting puffValveTopoFvMesh.C, for those taking notes at home:
Code:
/*---------------------------------------------------------------------------*\ I get a dimensions error when I run my modified sonicDyMFoam, but I think that's quasi-separate from the topoChangerFvMesh business, so I'll talk about it in the other thread. |
All times are GMT -4. The time now is 14:42. |