|
[Sponsors] |
November 29, 2012, 12:18 |
Moving obstacle (translation) in a channel
|
#1 |
New Member
Guillaume
Join Date: Nov 2012
Posts: 10
Rep Power: 13 |
Hi guys,
I would like to model the "simple" case of an obstacle (a parallelepiped) translating along a channel. As the channel is quite long, I would like to change the topology of the mesh during the computation. How would you do that ? Which dynamic class to call in dynamicMeshDict ? I searched a little bit and it seems that the only way is to use movingConeTopoFvMesh class and to modify it deeply, according to my needs. Nevertheless, I found documents on Internet mentioning other classes such as LinearValveLayersFvMesh and LinearValveFvMesh which seem to rely on sliding interface between a master and a slave mesh. Using this kind of class appears easier, but they look like desactivated in version 2.1.1. of openFOAM. Did some of you manage to use these classes recently ? If yes, what do you think about them ? Thanks in advance for your support. |
|
December 24, 2012, 09:20 |
|
#2 |
Senior Member
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17 |
I'm facing the same problem. Did you find something ?
__________________
Daniele Vicario blueCFD2.1 - Windows 7 |
|
December 24, 2012, 11:48 |
|
#3 |
Senior Member
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17 |
Some more information regarding my case.
Gloq, tell me if your meshing problem is different, I'll move this post in a new thread. Simple configuration: A sphere inside a pipe. Mesh obtained by SHM. In few words: I want to see the sphere pushed away by the flow. Here are the setup. ControlDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application pimpleDyMFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 50; deltaT 0.001; writeControl adjustableRunTime; writeInterval 0.02; purgeWrite 0; writeFormat ascii; writePrecision 10; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep yes; maxCo 5; maxDeltaT 0.01; libs ( "libOpenFOAM.so" "libincompressibleRASModels.so" "libfvMotionSolvers.so" "libforces.so" ); functions { forces { type forces; functionObjectLibs ("libforces.so"); outputControl timeStep; outputInterval 10; patches (oggetto); pName p; UName U; rhoName rhoInf; log true; rhoInf 1000; CofR (0 0 0); } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object motionProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libfvMotionSolvers.so"); solver displacementLaplacian; diffusivity inverseDistance (oggetto); // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class pointVectorField; location "0.01"; object pointDisplacement; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 0 0 0 0 0]; internalField uniform (0 0 0); boundaryField { wall { type fixedValue; value uniform (0 0 0); } inlet { type fixedValue; value uniform (0 0 0); } outlet { type fixedValue; value uniform (0 0 0); } oggetto { type sixDoFRigidBodyDisplacement; centreOfMass (0 0 0.2); momentOfInertia (0.000001 0.000001 0.000001); mass 0.01; rhoName rhoInf; rhoInf 1000; report on; value uniform (0 0 0); } } // ************************************************************************* // Everything is fine within the limit of dynamicMotionSolverFvMesh approximation (small mesh movements). Enclosed you can find some pictures. I hoped to solve the problem just replacing "dynamicMotionSolverFvMesh" with another solver name... it's christmas, tell me I'm right . Thanks !
__________________
Daniele Vicario blueCFD2.1 - Windows 7 |
|
December 24, 2012, 12:46 |
|
#4 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Daniele: I'm unable to help much on this, but the following details might help you:
Bruno
__________________
|
||
December 25, 2012, 21:31 |
|
#5 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
If you can stick to tetrahedral meshes, the dynamicTopoFvMesh class should be able to do it. Here's a remeshing example:
IC Engine re-meshing You can find the repository here: https://github.com/smenon/dynamicTopoFvMesh |
|
December 26, 2012, 03:50 |
|
#6 |
Senior Member
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17 |
Thanks to all.
@deepsterblue: I started to dream of that movie several days ago... Even if I'm used to SHM hex mesh I'll try it, many thanks ! @Bruno: I had already read the document you suggested but togheter with many other. Thanks for focus me on this. I'll go deep into topoChangerFvMesh class. The damBreakWithObstacle case is really interesting but I don't think it's what I need. Do I ? I also found a very good step by step guide regarding moving (rotating in this case) an object: http://www.cfd-online.com/Forums/ope...gear-pump.html. I still don't know if a similar approach can be used to generalize moving mesh cases, even in problems where the motion of an object is caused by the fluid. For example, applied to my above simple case: - Use dynamicMotionSolverFvMesh to solve the case until the quality of the mesh is degrading too much (Q: how much & how ?) - Fix the above mesh (Q: how to remesh it ?) remapping the previous solution. - Repeat the cycle. For sure it won't be an efficient way to solve a particular problem because of the calculation cost of remeshing everything every few iterations but at least it would be general. Can this be done ? Thanks, Daniele
__________________
Daniele Vicario blueCFD2.1 - Windows 7 Last edited by danvica; December 26, 2012 at 03:53. Reason: Grammatic editing |
|
December 26, 2012, 04:46 |
|
#7 |
Senior Member
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17 |
BTW what is rawTopoChangerFvMesh ?
I'm looking at the code but... well any help would be really appreciated. Thanks.
__________________
Daniele Vicario blueCFD2.1 - Windows 7 |
|
December 27, 2012, 03:19 |
|
#8 |
Senior Member
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17 |
@deepsterblue:
Can I install it even if I use OF 2.1 ? Or should I use an extended release ? Thanks.
__________________
Daniele Vicario blueCFD2.1 - Windows 7 |
|
December 27, 2012, 08:40 |
|
#9 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
It should work with OpenFOAM-2.1.x - take a look at the Port-2.1.x branch of the repository.
Once you have the repository checked out, do this: git checkout Port-2.1.x There are install instructions posted for the compile process with 2.1.x in the Install.txt for that branch |
|
December 27, 2012, 11:31 |
|
#10 |
Senior Member
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17 |
Many thanks. It will ll be a little more complicated because I'm working with a Windows porting of OF but it'll be done.
I just want to point out this good paper: DYNAMIC MESH HANDLING IN OPENFOAM APPLIED TO FLUID-STRUCTURE INTERACTION SIMULATIONS(http://www.google.it/url?sa=t&rct=j&...55534169,d.bGE) It clarifies different dynamic mesh approaches in a clear way. BTW: Compliment to Mr. Menon ! Now I just have to re-evaluate tet-meshes vs. hex-meshes performances. Regards,
__________________
Daniele Vicario blueCFD2.1 - Windows 7 |
|
December 31, 2012, 05:38 |
|
#11 |
Senior Member
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17 |
__________________
Daniele Vicario blueCFD2.1 - Windows 7 |
|
December 31, 2012, 10:59 |
|
#12 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
In response to the original poster, moving a parallelopiped can be done by using the layerAdditionRemoval polyTopoChanger. I've tried using rawTopoChangerFvMesh, but I think that is a generic class you can copy and use to implement topology changes. When making a new topoChanger class, I like to proceed like this:
1. Identify what operations need to be done to change the mesh (cell/face/point addition or removal etc) 2. See what polyTopoChanger (in dynamicMeshDict) will perform the operation most efficiently (granted the documentation for these isn't stellar, you may have to do some digging. A quick summary of two - layerAdditionRemoval: creates or destroys a layer of cells adjacent to a specifies faceZone based on the minimum/maximum thickness of that layer. Only works with simply connected surfaces with minimal warping (fairly consistent face normal). Can be used when a surface is translating and we don't want the cell aspect ratio to change - attachDetach: switches a set of internal faces to a pair of boundary patches to created internal walls. Can be used to make valves which can be actuated according to times or to other criteria - hexRef8: refinement of hexahedral meshes; see dynamicRefineFvMesh 3. If possible, find an existing fvMesh class that implements the polyTopoChanger and modify Otherwise, take rawTopochangerFvMesh and get to work. Good luck! |
|
January 28, 2013, 17:24 |
|
#13 |
Senior Member
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17 |
Hi,
I am currently trying to solve problem with solution dependent mesh. In short, I have to change shape of one boundary of the mesh every time step by using information from previous time step. So I dont know how the mesh (boundary of the mesh) is going to behave a priori. Do you know how should I attack this problem ? Thanks ZMM |
|
January 28, 2013, 17:59 |
|
#14 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
This sounds like (or is at least related to) fluid structure interaction. Do a search for FSI and you should be able to find useful links.
|
|
July 2, 2013, 10:47 |
|
#15 |
New Member
Join Date: May 2013
Posts: 4
Rep Power: 12 |
Hello everyone,
I tried to follow the advice of Marco: I modified solidBodyMotionFvMesh file in order to call rawTopoChangerFvMesh. The modification are: In solidBodyMotionFvMesh.H, in private data: rawTopoChangerFvMesh topoChanger_ In solidBodyMotionFvMesh.C: In constructor: topoChanger_(io), In members functions: topoChanger_.update(); When I Run moveDynamicMesh, I see the mesh moving, and cells at the entry and the exit of the channel are stretching and squeezing, but no layer is created. After some iterations, moving cell are even overlapping the others. It gives me the feeling that layer addition/removal is not taken into account. Nevertheless, when I modify the file constant/meshModifiers by giving negative value for thickness, for example, I have an error message. So that is in contradiction with my first feeling ! Did someone know what I am doing wrong ? Thanks ! |
|
July 2, 2013, 11:23 |
|
#16 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
How do you initialize the polyTopoChange? I'm just wondering if the layerAdditionRemoval was created, and if the request to update is sent every time.
|
|
July 3, 2013, 03:27 |
|
#17 |
New Member
Join Date: May 2013
Posts: 4
Rep Power: 12 |
Hi Marco, thanks for your reply !
I didn't change anything about the poyTopoChange: rawTopoChangerFvMesh calls topoChangerFvMesh, which calls polyTopoChanger, which calls polyTopoChange (correct me if I'm wrong). I only specify in the meshModifiers file that I want layerAdditionRemoval, and the parameters needed (thickness...) |
|
July 3, 2013, 11:30 |
|
#18 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Have you specified the faceZones where you want layers added/removed? I'm curious if rawTopoChangerFvMesh can create the appropriate given a properly defined meshModifiers file.
|
|
July 3, 2013, 11:42 |
|
#19 |
New Member
Join Date: May 2013
Posts: 4
Rep Power: 12 |
Yes, I have created 2 faceZones that I specify in the meshModifiers.
|
|
July 3, 2013, 11:45 |
|
#20 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
What happens if you define one of the layerAdditionRemoval modifiers incorrectly? Please post the error message from your solver.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
obstacle in a linear channel | Stephy | OpenFOAM Running, Solving & CFD | 5 | November 2, 2011 10:42 |
open channel flow with obstacle !!! | opard | OpenFOAM | 4 | May 13, 2011 06:30 |
Moving cell in a channel | yongshenglian | OpenFOAM Running, Solving & CFD | 0 | October 6, 2008 16:45 |
Translation and rotation for a moving wall | Stéphane Champmartin | FLUENT | 1 | November 28, 2006 10:57 |
Channel with 2D surface mounted obstacle | Francesco Marra | Main CFD Forum | 1 | January 5, 2000 03:49 |