
[Sponsors] 
July 31, 2013, 14:39 
Getting linearValveFvMesh to work in 2.2.x

#1 
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 728
Rep Power: 20 
Hello fellow forum users,
I've been looking to get some of the topology modifiers working in the official stream, and one that is included with the install but which I have yet to see is the sliding interface. Since we've been successful in getting layers and attachDetach, I figured we could tackle this one. src/topoChangerFvMesh includes a mesh class called linearValveFvMesh which is not compiled by default because it hasn't been updated. I've included an amended version that does compile, but I'm not sure if its completely correct. Copy this version into src/topoChangerFvMesh and change the Make/files to include this in the library. The case I have uploaded is a simple geometry, with a small passage opening into a larger one. The smaller passage slides along the edge of the large one, and under my current understanding of the sliding interface should detach, move, then reattach. When I first start a case with moveDynamicMesh, the first time step executes, and then I get the following error: Code:
Time = 1e05 linearValveFvMesh: attached! Decoupling sliding interfaces > FOAM FATAL ERROR: Face 123191 reduced to less than 3 points. Topological/cutting error. Old face: 4(42911 58572 58761 46223) new face: 2(42911 46223) From function void slidingInterface::decoupleInterface(polyTopoChange& ref) const in file slidingInterface/decoupleSlidingInterface.C at line 348. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) in "/home/gandalf/OpenFOAM/OpenFOAM2.2.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/home/gandalf/OpenFOAM/OpenFOAM2.2.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #2 Foam::slidingInterface::decoupleInterface(Foam::polyTopoChange&) const in "/home/gandalf/OpenFOAM/OpenFOAM2.2.x/platforms/linuxGccDPOpt/lib/libdynamicMesh.so" #3 Foam::slidingInterface::setRefinement(Foam::polyTopoChange&) const in "/home/gandalf/OpenFOAM/OpenFOAM2.2.x/platforms/linuxGccDPOpt/lib/libdynamicMesh.so" #4 Foam::polyTopoChanger::topoChangeRequest() const in "/home/gandalf/OpenFOAM/OpenFOAM2.2.x/platforms/linuxGccDPOpt/lib/libdynamicMesh.so" #5 Foam::polyTopoChanger::changeMesh(bool, bool, bool, bool) in "/home/gandalf/OpenFOAM/OpenFOAM2.2.x/platforms/linuxGccDPOpt/lib/libdynamicMesh.so" #6 Foam::linearValveFvMesh::update() in "/home/gandalf/OpenFOAM/gandalf2.2.x/platforms/linuxGccDPOpt/lib/libmyTopochangeFvMesh.so" #7 in "/home/gandalf/OpenFOAM/OpenFOAM2.2.x/platforms/linuxGccDPOpt/bin/moveDynamicMesh" #8 __libc_start_main in "/lib/libc.so.6" #9 at /home/abuild/rpmbuild/BUILD/glibc2.15/csu/../sysdeps/i386/elf/start.S:122 Thanks in advance! 

August 1, 2013, 12:14 

#2 
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 728
Rep Power: 20 
Looking at the class again, I realized I missed calls to update mesh as well. When I add those in I get the following error:
Code:
> FOAM FATAL ERROR: Incompatible size before mapping. Field size: 155680 map size: 155552 From function void MapInternalField<Type, MeshMapper, surfaceMesh>::operator() ( Field<Type>& field, const MeshMapper& mapper ) const in file lnInclude/MapFvSurfaceField.H at line 73. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) in "/home/gandalf/OpenFOAM/OpenFOAM2.2.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/home/gandalf/OpenFOAM/OpenFOAM2.2.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #2 at fvMesh.C:0 #3 Foam::fvMesh::mapFields(Foam::mapPolyMesh const&) in "/home/gandalf/OpenFOAM/OpenFOAM2.2.x/platforms/linuxGccDPOpt/lib/libfiniteVolume.so" #4 Foam::fvMesh::updateMesh(Foam::mapPolyMesh const&) in "/home/gandalf/OpenFOAM/OpenFOAM2.2.x/platforms/linuxGccDPOpt/lib/libfiniteVolume.so" #5 Foam::linearValveFvMesh::update() in "/home/gandalf/OpenFOAM/gandalf2.2.x/platforms/linuxGccDPOpt/lib/libmyTopochangeFvMesh.so" #6 in "/home/gandalf/OpenFOAM/OpenFOAM2.2.x/platforms/linuxGccDPOpt/bin/moveDynamicMesh" #7 __libc_start_main in "/lib/libc.so.6" #8 at /home/abuild/rpmbuild/BUILD/glibc2.15/csu/../sysdeps/i386/elf/start.S:122 Last edited by mturcios777; August 1, 2013 at 12:25. Reason: Added question about setMorphTimeIndex 

February 11, 2014, 08:30 

#3 
New Member
Martin Beeger
Join Date: Oct 2013
Posts: 10
Rep Power: 5 
Hello!
Im trying do simulate a moving mesh with a sliding interface with pimpleDymFoam. So far your setup and case was very helpful. So far I got my geometry defined and also got your Valve class compiled into my openfoam 2.2.1 version. Then i succeeded in running pimpleDymFoam with my case. The actual problem i have is, that the interface ist actually not detached and attached, which leads to enourmous cell deformation. The picture shows my mesh after 5 steps, the lower part is moving left, the upper one is at rest. Here a solver log: Code:
/**\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.2.1   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ Build : 2.2.157f3c3617a2d Exec : pimpleDyMFoam Date : Feb 11 2014 Time : 13:27:17 Host : "HEIPC85541ubuntu" PID : 1777 Case : /home/pizzard/OpenFOAM/pizzard2.2.1/haschur/pimpleDyMFoam/cellMotionFirstTry nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring runtime modified files using timeStampMaster allowSystemOperations : Disallowing usersupplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Selecting dynamicFvMesh linearValveFvMesh Selecting motion solver: velocityComponentLaplacian Selecting motion diffusion: directional void linearValveFvMesh::addZonesAndModifiers() : Zones and modifiers already present. Skipping. Reading field p Reading field U Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Reading field rAU if present No finite volume options present PIMPLE: no residual control data found. Calculations will employ 2 corrector loops Starting time loop Courant Number mean: 2.35719e20 max: 9.31866e18 deltaT = 2e06 Time = 2e06 linearValveFvMesh: detached! Sliding interfaces decoupled Sliding Interfaces sucessfully decoupled! GAMG: Solving for cellMotionUx, Initial residual = 1, Final residual = 9.91454e09, No Iterations 321 Coupling sliding interfaces Sliding Interfaces sucessfully decoupled! Moving points post slider attach linearValveFvMesh: detached! Sliding interfaces coupled: 0 GAMG: Solving for pcorr, Initial residual = 1.50744e05, Final residual = 5.8296e08, No Iterations 8 GAMG: Solving for pcorr, Initial residual = 9.90667e06, Final residual = 4.92653e08, No Iterations 4 GAMG: Solving for pcorr, Initial residual = 3.34591e06, Final residual = 4.46853e08, No Iterations 3 time step continuity errors : sum local = 1.5378e22, global = 1.7368e23, cumulative = 1.7368e23 PIMPLE: iteration 1 DILUPBiCG: Solving for Ux, Initial residual = 0.0107594, Final residual = 0.000167086, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0945104, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.00304966, Final residual = 4.73578e05, No Iterations 2 GAMG: Solving for p, Initial residual = 1, Final residual = 0.00610149, No Iterations 6 GAMG: Solving for p, Initial residual = 0.0175591, Final residual = 0.000150969, No Iterations 5 GAMG: Solving for p, Initial residual = 0.00556229, Final residual = 3.78537e05, No Iterations 5 time step continuity errors : sum local = 8.60855e08, global = 2.5772e08, cumulative = 2.5772e08 GAMG: Solving for p, Initial residual = 0.0300467, Final residual = 0.000239986, No Iterations 6 GAMG: Solving for p, Initial residual = 0.0241693, Final residual = 0.000186804, No Iterations 4 GAMG: Solving for p, Initial residual = 0.00680939, Final residual = 5.70799e05, No Iterations 4 time step continuity errors : sum local = 5.68957e08, global = 1.38687e08, cumulative = 1.19033e08 GAMG: Solving for p, Initial residual = 0.0250689, Final residual = 0.000146277, No Iterations 4 GAMG: Solving for p, Initial residual = 0.00795179, Final residual = 6.37941e05, No Iterations 5 GAMG: Solving for p, Initial residual = 0.0032912, Final residual = 3.15121e05, No Iterations 4 time step continuity errors : sum local = 2.83412e08, global = 2.01249e08, cumulative = 3.20282e08 GAMG: Solving for p, Initial residual = 0.00836049, Final residual = 4.95432e05, No Iterations 4 GAMG: Solving for p, Initial residual = 0.00224231, Final residual = 1.21857e05, No Iterations 4 GAMG: Solving for p, Initial residual = 0.000868547, Final residual = 5.3291e06, No Iterations 3 time step continuity errors : sum local = 4.6474e09, global = 6.49243e10, cumulative = 3.1379e08 GAMG: Solving for p, Initial residual = 0.00334386, Final residual = 2.45829e05, No Iterations 3 GAMG: Solving for p, Initial residual = 0.000802673, Final residual = 5.40721e06, No Iterations 4 GAMG: Solving for p, Initial residual = 0.000319812, Final residual = 2.14775e06, No Iterations 3 time step continuity errors : sum local = 1.87786e09, global = 3.85007e10, cumulative = 3.1764e08 PIMPLE: iteration 2 DILUPBiCG: Solving for Ux, Initial residual = 0.26793, Final residual = 3.48295e08, No Iterations 8 DILUPBiCG: Solving for Uy, Initial residual = 0.140926, Final residual = 1.70975e08, No Iterations 8 DILUPBiCG: Solving for Uz, Initial residual = 0.390905, Final residual = 4.5078e08, No Iterations 8 GAMG: Solving for p, Initial residual = 0.155118, Final residual = 0.00104918, No Iterations 5 GAMG: Solving for p, Initial residual = 0.0158902, Final residual = 0.000133865, No Iterations 4 GAMG: Solving for p, Initial residual = 0.00473208, Final residual = 2.87043e05, No Iterations 4 time step continuity errors : sum local = 2.69914e08, global = 1.26524e08, cumulative = 4.44164e08 GAMG: Solving for p, Initial residual = 0.0940748, Final residual = 0.00086161, No Iterations 5 GAMG: Solving for p, Initial residual = 0.0217233, Final residual = 0.000166681, No Iterations 4 GAMG: Solving for p, Initial residual = 0.00587747, Final residual = 3.12268e05, No Iterations 4 time step continuity errors : sum local = 1.56548e08, global = 7.91986e09, cumulative = 3.64965e08 GAMG: Solving for p, Initial residual = 0.0300275, Final residual = 0.000122957, No Iterations 4 GAMG: Solving for p, Initial residual = 0.00550682, Final residual = 3.29272e05, No Iterations 5 GAMG: Solving for p, Initial residual = 0.00201069, Final residual = 1.80117e05, No Iterations 3 time step continuity errors : sum local = 8.98568e09, global = 7.76606e10, cumulative = 3.57199e08 GAMG: Solving for p, Initial residual = 0.00832041, Final residual = 7.13671e05, No Iterations 3 GAMG: Solving for p, Initial residual = 0.00163519, Final residual = 5.93839e06, No Iterations 4 GAMG: Solving for p, Initial residual = 0.000627401, Final residual = 2.99847e06, No Iterations 4 time step continuity errors : sum local = 1.51558e09, global = 3.25407e10, cumulative = 3.53945e08 GAMG: Solving for p, Initial residual = 0.00338704, Final residual = 2.54999e05, No Iterations 3 GAMG: Solving for p, Initial residual = 0.000560385, Final residual = 5.51933e06, No Iterations 3 GAMG: Solving for p, Initial residual = 0.000209328, Final residual = 8.23839e08, No Iterations 8 time step continuity errors : sum local = 4.17036e11, global = 1.08622e11, cumulative = 3.54054e08 ExecutionTime = 6.47 s ClockTime = 6 s So far I dont include this. What i want is that the solver splits up the cells at that interface and does a new faces merging in every step. How do I tell this in the dynamic mesh dict? If i try to run run your case i get the follwing error: Code:
/**\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.2.1   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ Build : 2.2.157f3c3617a2d Exec : moveDynamicMesh Date : Feb 11 2014 Time : 14:14:25 Host : "HEIPC85541ubuntu" PID : 2824 Case : /home/pizzard/Arbeitsfläche/slideTest nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring runtime modified files using timeStampMaster allowSystemOperations : Disallowing usersupplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Selecting dynamicFvMesh linearValveFvMesh > FOAM FATAL ERROR: Unknown dynamicFvMesh type linearValveFvMesh Valid dynamicFvMesh types are : 6 ( dynamicInkJetFvMesh dynamicMotionSolverFvMesh dynamicRefineFvMesh multiSolidBodyMotionFvMesh solidBodyMotionFvMesh staticFvMesh ) From function dynamicFvMesh::New(const IOobject&) in file dynamicFvMesh/dynamicFvMeshNew.C at line 81. FOAM exiting And i also get a warning that libmyTopochangeFvMesh.so could not be found. Last edited by Ralinus; February 11, 2014 at 09:13. Reason: added infos from slide_walls 

February 11, 2014, 12:58 

#4 
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 728
Rep Power: 20 
Hello there!
The reason that I have the extra library specified in the controlDict is that I try to keep the base OpenFOAM code separated from anything I create, so I usually have a separate dynamically linked library that has the classes I create. Since your pimpleDyMFoam run shows that the linearValveFvMesh you have the mesh class compiled, but I wasn't able to get it running completely correctly, which is why I posted it here to work on collaboratively. As for why you get the error message for moveDynamicMesh, it looks like the linearValveFvMesh class can't be found. When you compiled the class, did you make it part of the topoChangerFvMesh library, the dynamicFvMesh library, or was it a separate library. And is the picture included from the pimpleDyMFoam simulation? 

February 12, 2014, 06:37 

#5  
New Member
Martin Beeger
Join Date: Oct 2013
Posts: 10
Rep Power: 5 
Quote:
The library has been built successfully afterwards. Quote:
Before all 3 of them, moveMesh, moveDynamicMesh and pimpleDyMFoam gave me the above describle linearValve... not found error. After compiling the new topoChangerFvMesh.so moveMesh and pimpleDyMFoam now no longer have this Problem, but moveDynamicMesh still has. Perhaps I need to recompile the MotionSolver lib too, I'll try that. /edit: did that too, did not help Yes the picture below is the result of my simulation with pimpleDyMFoam, but actually the mesh is not detatched and reattached. Thanks in advance, Martin /edit: I ran your case with pimpleDymFoam and get a similar error to yours. Opposed to moveDynamicMesh linearValeFvMesh is known to the solver. Last edited by Ralinus; February 12, 2014 at 08:39. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
How to work with constant pressure?  Martin  CDadapco  2  February 25, 2009 14:23 
Getting FoamX to work  shaun  OpenFOAM Installation  12  March 23, 2007 09:55 
work related to brake study of a vehical  aero  CDadapco  3  November 23, 2006 08:43 
Why do the Plant library cases don't work?  Alumna  Phoenics  6  June 22, 2004 12:08 
why my InForm doesn't work?  green  Phoenics  2  May 27, 2004 21:03 