|
[Sponsors] |
Dynamic Mesh Refinement + twoLiquidMixingFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 12, 2017, 03:43 |
Dynamic Mesh Refinement + twoLiquidMixingFoam
|
#1 |
New Member
Join Date: Feb 2017
Posts: 6
Rep Power: 9 |
Good morning
I am working with a model for microfluidic mixing using the twoLiquidMixingFoam solver. I am curious to know if there is a way to implement the dynamicMesh with this solver. I need to improve the quality of my soultion without having to use a very fine and unreasonable mesh. Is there some tutorials around about this? Thanks |
|
May 12, 2017, 03:50 |
|
#2 |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
I do not know of any tutorials on how to do that.
However, if you simply open both interFoam and interDyMFoam and your "twoLiquidMixingDyMFoam" solver, then by direct comparison between interFoam and interDyMFoam you should be able to implement it into your "twoLiquidMixingDyMFoam". (The only difference between interFoam and interDyMFoam is the "DyM" part: dynamic mesh.) |
|
May 15, 2017, 10:27 |
|
#3 | |
New Member
Join Date: Feb 2017
Posts: 6
Rep Power: 9 |
Quote:
I need yr help in another question. Do you know a way to do dynamicMeshRefinement and solidBodyMotionFvMesh at the same time, I mean I want to move a part of the Mesh plus refining the mesh for alpha field at the same time, if you know a tutorial or a previous post about this since I am drowned in searching w/o a useful result. Thanks, have a nice day |
||
May 16, 2017, 04:06 |
|
#4 | |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
Quote:
Evidently, that does not mean it does not exist, as I simply have never used/searched for solidBodyMotionFvMesh. When I quickly look at interDyMFoam, I see that the following mesh methods are called: Code:
mesh.update() // calculate mesh motion in the child (so dynamicRefineFvMesh or solidBodyMotionFvMesh) mesh.changing() // implemented by polyMesh, returns "true" if the mesh changed // And just some getters: mesh.C() mesh.Cf() mesh.Sf() Now, if you wish to combine them, there is one hurdle to overcome: your simulation uses only one mesh. You could create a wrapper class like: Code:
class wrapperFvMesh : public dynamicFvMesh { private : dynamicRefineFvMesh refineMesh; solidBodyMotionFvMesh motionMesh; public: bool update(){ motionMesh.update() refineMesh.update() } // And a constructor and whatever you need ... } However, the problem is that those will be two different meshes, which are also different than your wrapperFvMesh. Therefore, this will not work... After all, your simulation will use wrapperFvMesh, which will never be updated! In other words, the only way to combine them, is to break them down first. I'd take all methods of dynamicRefineFvMesh to myDynamicRefineFvMeshMethods which is a new class that does not inherit from dynamicFvMesh. That is, it should not be a mesh object. Rather, all methods should take the actual mesh (which would be your wrapperFvMesh) as an argument; or set a pointer in the constructor of the my...Methods class. Now, if you do the same for solidBodyMotionFvMesh, you will end up with two calculator classes that can apply the calculations to the same mesh: your wrapperFvMesh. In the end, all you have to change then is all references to "*this" should become "*mesh"..., because "*this" is no longer the mesh, but your mesh-pointer will be. Then, any calls to mesh methods, should be forwarded to your mesh pointer. It will be a challenge, but that way it should be quite feasible. I strongly recommend using an IDE (e.g.: [1] [2]) for making such changes, as it will be able to tell you immediately which are the "mesh methods" that you should forward etc. |
||
March 17, 2020, 19:10 |
|
#6 | |
Senior Member
Join Date: Jul 2019
Posts: 148
Rep Power: 7 |
Quote:
I am wondering if any got the chance to compile a dynamic mesh to twoLiquidMixingFoam. Thanks |
||
September 14, 2020, 09:02 |
|
#7 |
Senior Member
Join Date: Jul 2019
Posts: 148
Rep Power: 7 |
Hi, I am wondering if you managed to integrate dynamic meshing to twoLiquidMixingFoam. I want to study the effect of dragging a solid wall from a fluid domain. Thanks.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] snappyHexMesh sticking point | natty_king | OpenFOAM Meshing & Mesh Conversion | 11 | February 20, 2024 10:12 |
[snappyHexMesh] snappyHexMesh can't create refimenet region | clktp | OpenFOAM Meshing & Mesh Conversion | 3 | February 27, 2022 10:26 |
[snappyHexMesh] very bad quality snapped mesh | federicabi | OpenFOAM Meshing & Mesh Conversion | 18 | September 26, 2018 11:33 |
[ICEM] 3D Dynamic Mesh - Boundary layer mesh issues | nathanricks | ANSYS Meshing & Geometry | 0 | September 23, 2015 06:14 |
How to know mesh size after dynamic refinement | tayo | OpenFOAM | 16 | May 22, 2013 14:39 |