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

Getting linearValveFvMesh to work in 2.2.x

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 31, 2013, 14:39
Default Getting linearValveFvMesh to work in 2.2.x
  #1
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 727
Rep Power: 18
mturcios777 will become famous soon enough
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 = 1e-05
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/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/home/gandalf/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2  Foam::slidingInterface::decoupleInterface(Foam::polyTopoChange&) const in "/home/gandalf/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libdynamicMesh.so"
#3  Foam::slidingInterface::setRefinement(Foam::polyTopoChange&) const in "/home/gandalf/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libdynamicMesh.so"
#4  Foam::polyTopoChanger::topoChangeRequest() const in "/home/gandalf/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libdynamicMesh.so"
#5  Foam::polyTopoChanger::changeMesh(bool, bool, bool, bool) in "/home/gandalf/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libdynamicMesh.so"
#6  Foam::linearValveFvMesh::update() in "/home/gandalf/OpenFOAM/gandalf-2.2.x/platforms/linuxGccDPOpt/lib/libmyTopochangeFvMesh.so"
#7  
 in "/home/gandalf/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/bin/moveDynamicMesh"
#8  __libc_start_main in "/lib/libc.so.6"
#9  
 at /home/abuild/rpmbuild/BUILD/glibc-2.15/csu/../sysdeps/i386/elf/start.S:122
Any help would be appreciated. At this point I believe that 40% of the problem is the library and 60% is the case setup.

Thanks in advance!
Attached Files
File Type: gz myLinearValveFvMesh.tar.gz (3.3 KB, 16 views)
File Type: gz slideTest.tar.gz (6.8 KB, 32 views)
mturcios777 is offline   Reply With Quote

Old   August 1, 2013, 12:14
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 727
Rep Power: 18
mturcios777 will become famous soon enough
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/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/home/gandalf/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2   at fvMesh.C:0
#3  Foam::fvMesh::mapFields(Foam::mapPolyMesh const&) in "/home/gandalf/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#4  Foam::fvMesh::updateMesh(Foam::mapPolyMesh const&) in "/home/gandalf/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#5  Foam::linearValveFvMesh::update() in "/home/gandalf/OpenFOAM/gandalf-2.2.x/platforms/linuxGccDPOpt/lib/libmyTopochangeFvMesh.so"
#6  
 in "/home/gandalf/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/bin/moveDynamicMesh"
#7  __libc_start_main in "/lib/libc.so.6"
#8  
 at /home/abuild/rpmbuild/BUILD/glibc-2.15/csu/../sysdeps/i386/elf/start.S:122
I've included the changes in the attached file. One thing I don't quite see what the equivalent function for setMorphTimeIndex is in v2.2.x. I would like to eliminate this as a potential error source, so any help would be great.
Attached Files
File Type: gz myLinearValveFvMesh.tar.gz (3.4 KB, 18 views)

Last edited by mturcios777; August 1, 2013 at 12:25. Reason: Added question about setMorphTimeIndex
mturcios777 is offline   Reply With Quote

Old   February 11, 2014, 08:30
Default
  #3
New Member
 
Martin Beeger
Join Date: Oct 2013
Posts: 10
Rep Power: 3
Ralinus is on a distinguished road
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.1-57f3c3617a2d
Exec   : pimpleDyMFoam
Date   : Feb 11 2014
Time   : 13:27:17
Host   : "HEIPC85541-ubuntu"
PID    : 1777
Case   : /home/pizzard/OpenFOAM/pizzard-2.2.1/haschur/pimpleDyMFoam/cellMotionFirstTry
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied 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.35719e-20 max: 9.31866e-18
deltaT = 2e-06
Time = 2e-06

linearValveFvMesh: detached!
Sliding interfaces decoupled
Sliding Interfaces sucessfully decoupled!
GAMG:  Solving for cellMotionUx, Initial residual = 1, Final residual = 9.91454e-09, 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.50744e-05, Final residual = 5.8296e-08, No Iterations 8
GAMG:  Solving for pcorr, Initial residual = 9.90667e-06, Final residual = 4.92653e-08, No Iterations 4
GAMG:  Solving for pcorr, Initial residual = 3.34591e-06, Final residual = 4.46853e-08, No Iterations 3
time step continuity errors : sum local = 1.5378e-22, global = 1.7368e-23, cumulative = 1.7368e-23
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.73578e-05, 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.78537e-05, No Iterations 5
time step continuity errors : sum local = 8.60855e-08, global = 2.5772e-08, cumulative = 2.5772e-08
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.70799e-05, No Iterations 4
time step continuity errors : sum local = 5.68957e-08, global = -1.38687e-08, cumulative = 1.19033e-08
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.37941e-05, No Iterations 5
GAMG:  Solving for p, Initial residual = 0.0032912, Final residual = 3.15121e-05, No Iterations 4
time step continuity errors : sum local = 2.83412e-08, global = 2.01249e-08, cumulative = 3.20282e-08
GAMG:  Solving for p, Initial residual = 0.00836049, Final residual = 4.95432e-05, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.00224231, Final residual = 1.21857e-05, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.000868547, Final residual = 5.3291e-06, No Iterations 3
time step continuity errors : sum local = 4.6474e-09, global = -6.49243e-10, cumulative = 3.1379e-08
GAMG:  Solving for p, Initial residual = 0.00334386, Final residual = 2.45829e-05, No Iterations 3
GAMG:  Solving for p, Initial residual = 0.000802673, Final residual = 5.40721e-06, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.000319812, Final residual = 2.14775e-06, No Iterations 3
time step continuity errors : sum local = 1.87786e-09, global = 3.85007e-10, cumulative = 3.1764e-08
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 0.26793, Final residual = 3.48295e-08, No Iterations 8
DILUPBiCG:  Solving for Uy, Initial residual = 0.140926, Final residual = 1.70975e-08, No Iterations 8
DILUPBiCG:  Solving for Uz, Initial residual = 0.390905, Final residual = 4.5078e-08, 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.87043e-05, No Iterations 4
time step continuity errors : sum local = 2.69914e-08, global = 1.26524e-08, cumulative = 4.44164e-08
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.12268e-05, No Iterations 4
time step continuity errors : sum local = 1.56548e-08, global = -7.91986e-09, cumulative = 3.64965e-08
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.29272e-05, No Iterations 5
GAMG:  Solving for p, Initial residual = 0.00201069, Final residual = 1.80117e-05, No Iterations 3
time step continuity errors : sum local = 8.98568e-09, global = -7.76606e-10, cumulative = 3.57199e-08
GAMG:  Solving for p, Initial residual = 0.00832041, Final residual = 7.13671e-05, No Iterations 3
GAMG:  Solving for p, Initial residual = 0.00163519, Final residual = 5.93839e-06, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.000627401, Final residual = 2.99847e-06, No Iterations 4
time step continuity errors : sum local = 1.51558e-09, global = -3.25407e-10, cumulative = 3.53945e-08
GAMG:  Solving for p, Initial residual = 0.00338704, Final residual = 2.54999e-05, No Iterations 3
GAMG:  Solving for p, Initial residual = 0.000560385, Final residual = 5.51933e-06, No Iterations 3
GAMG:  Solving for p, Initial residual = 0.000209328, Final residual = 8.23839e-08, No Iterations 8
time step continuity errors : sum local = 4.17036e-11, global = 1.08622e-11, cumulative = 3.54054e-08
ExecutionTime = 6.47 s  ClockTime = 6 s
I have 2 questions: in your control dict, you include libs ("libmyTopochangeFvMesh.so"); What is this and where do I get it from? Do i need it?
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.1-57f3c3617a2d
Exec   : moveDynamicMesh
Date   : Feb 11 2014
Time   : 14:14:25
Host   : "HEIPC85541-ubuntu"
PID    : 2824
Case   : /home/pizzard/Arbeitsfläche/slideTest
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied 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
If i use moveMesh instead everything works.
And i also get a warning that libmyTopochangeFvMesh.so could not be found.
Attached Images
File Type: jpg movingMeshSplittingFailure.jpg (62.2 KB, 26 views)

Last edited by Ralinus; February 11, 2014 at 09:13. Reason: added infos from slide_walls
Ralinus is offline   Reply With Quote

Old   February 11, 2014, 12:58
Default
  #4
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 727
Rep Power: 18
mturcios777 will become famous soon enough
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?
mturcios777 is offline   Reply With Quote

Old   February 12, 2014, 06:37
Default
  #5
New Member
 
Martin Beeger
Join Date: Oct 2013
Posts: 10
Rep Power: 3
Ralinus is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
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.
Is used a git branch and directly replaced the files in the openfoam source code then.
The library has been built successfully afterwards.

Quote:
Originally Posted by mturcios777 View Post
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?
I replaced just the src/topoChagerFvMesh/linearValveFvMesh files with your versions and changed the file under Make/files there and removed the comments for this file.

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.
Ralinus is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to work with constant pressure? Martin CD-adapco 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 CD-adapco 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 In-Form doesn't work? green Phoenics 2 May 27, 2004 21:03


All times are GMT -4. The time now is 03:52.