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

Dynamic Mesh Refinement + twoLiquidMixingFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By floquation

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 12, 2017, 03:43
Default Dynamic Mesh Refinement + twoLiquidMixingFoam
  #1
New Member
 
Join Date: Feb 2017
Posts: 6
Rep Power: 9
ashama is on a distinguished road
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
ashama is offline   Reply With Quote

Old   May 12, 2017, 03:50
Default
  #2
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21
floquation will become famous soon enough
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.)
floquation is offline   Reply With Quote

Old   May 15, 2017, 10:27
Smile
  #3
New Member
 
Join Date: Feb 2017
Posts: 6
Rep Power: 9
ashama is on a distinguished road
Quote:
Originally Posted by floquation View Post
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.)
Thanks for this info, I will try to do it and if I managed I will back to posted it here.

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

Old   May 16, 2017, 04:06
Default
  #4
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21
floquation will become famous soon enough
Quote:
Originally Posted by ashama View Post
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.
I'm sorry, but no, I have not seen such a thing before.
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()
In other words, it's all about mesh.update().

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 ...

}
to simply pass the update() call to both meshes.
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.
2538sukham likes this.
floquation is offline   Reply With Quote

Old   March 1, 2020, 19:28
Default
  #5
Senior Member
 
Join Date: Jul 2019
Posts: 148
Rep Power: 7
Bodo1993 is on a distinguished road
Dear ashama,

Greetings. I am wondering if you managed to add dynamic mesh to the twoLiquidMixingFoam solver.

Looking forward to hearing from you. Thanks.
Bodo1993 is offline   Reply With Quote

Old   March 17, 2020, 19:10
Default
  #6
Senior Member
 
Join Date: Jul 2019
Posts: 148
Rep Power: 7
Bodo1993 is on a distinguished road
Quote:
Originally Posted by Bodo1993 View Post
Dear ashama,

Greetings. I am wondering if you managed to add dynamic mesh to the twoLiquidMixingFoam solver.

Looking forward to hearing from you. Thanks.
Hi,
I am wondering if any got the chance to compile a dynamic mesh to twoLiquidMixingFoam.
Thanks
Bodo1993 is offline   Reply With Quote

Old   September 14, 2020, 09:02
Default
  #7
Senior Member
 
Join Date: Jul 2019
Posts: 148
Rep Power: 7
Bodo1993 is on a distinguished road
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.
Bodo1993 is offline   Reply With Quote

Reply


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


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


All times are GMT -4. The time now is 11:10.