Moving obstacle (translation) in a channel
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. |
I'm facing the same problem. Did you find something ?
|
2 Attachment(s)
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++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ 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 ! |
Greetings to all!
@Daniele: I'm unable to help much on this, but the following details might help you:
Bruno |
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 |
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 |
BTW what is rawTopoChangerFvMesh ?
I'm looking at the code but... well any help would be really appreciated. Thanks. |
@deepsterblue:
Can I install it even if I use OF 2.1 ? Or should I use an extended release ? Thanks. |
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 |
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, |
|
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! |
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 |
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.
|
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 ! |
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.
|
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...) |
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.
|
Yes, I have created 2 faceZones that I specify in the meshModifiers.
|
What happens if you define one of the layerAdditionRemoval modifiers incorrectly? Please post the error message from your solver.
|
If I make a mistake in the name of a faceZone, I have this message:
--> FOAM FATAL ERROR: Master face zone named layerPoss cannot be found. From function void Foam::layerAdditionRemoval::checkDefinition() in file layerAdditionRemoval/layerAdditionRemoval.C at line 64. FOAM aborting |
Hmm, interesting. I didn't know rawTopoChangerFvMesh created the required. Though I wonder if updateMesh is being called correctly since the constructor isn't explicit. Can you run the properly formatted case with the global debug flag for layerAdditionRemoval and post the log? Thanks.
|
Quote:
Can you demostrate a simple case that using the utility of rawTopochangerFvmesh calss?? Thanks a lot! regards, James. |
All times are GMT -4. The time now is 01:35. |