CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   attachDetach for compressible flow in 1.6-ext (http://www.cfd-online.com/Forums/openfoam-solving/102571-attachdetach-compressible-flow-1-6-ext.html)

mturcios777 May 28, 2012 20:25

attachDetach for compressible flow in 1.6-ext
 
Hello Everyone,

I've been struggling for weeks now trying to get the attachDetach to work in 2.1.x. So far incompressible works, but compressible can't seem to update the mesh flux field. If you have experience with this, please reply on this thread:

dynamicMesh, dynamicFvMesh and meshPhi

I think I have to give up this foolish crusade, but I'll gladly help anyone who wants to use attachDetach on 21x incompressible. Now I want to determine if attachDetach BC can be used in 1.6-ext. Had anyone used attachDetachFvMesh with compressible flow in 1.6-ext, and would be so kind as to upload a sample case? I think I also need a solver like rhoPimpleDyMFoam if such exits. Many thanks

novakm January 27, 2013 04:55

Quote:

Originally Posted by mturcios777 (Post 363490)
Hello Everyone,

I've been struggling for weeks now trying to get the attachDetach to work in 2.1.x. So far incompressible works, but compressible can't seem to update the mesh flux field. If you have experience with this, please reply on this thread:

dynamicMesh, dynamicFvMesh and meshPhi

I think I have to give up this foolish crusade, but I'll gladly help anyone who wants to use attachDetach on 21x incompressible. Now I want to determine if attachDetach BC can be used in 1.6-ext. Had anyone used attachDetachFvMesh with compressible flow in 1.6-ext, and would be so kind as to upload a sample case? I think I also need a solver like rhoPimpleDyMFoam if such exits. Many thanks


Hi Marco.

Nowadays i also struggle with the implementation of attachDetach BC into may case in OF 21x.

My case is based on modified coldEngineFoam solver on static geometry. The geometry has been exported form es-ice (star-cd mgt) and imported to OF by star4ToFoam and after import contains several internal patches and I am not able to get rid of them by using the utilities like stitchMesh (ends with cutting error type B), attachMesh (runs without any effect on the mesh). So the attachDetach bnd cond seems to be the last alternative to handle these internal patches.

Would you mind to share with me your current progress on the topic of attachDetach BC?

Y. c.

-Martin

novakm@karlin.mff.cuni.cz

mturcios777 January 28, 2013 14:12

Hello Martin,

You are fortunate that I decided to see all the new posts, as I unsubscribed to this thread thinking no one would look at it.

I have actually managed to get attachDetach working on all kinds of geometries. But I'm not sure this is what you need exactly. attachDetach is for handling the switching of internal faces to boundary faces or vice-versa (like the opening and closing of internal valves). If all you need is to remove internal patches to clean up geometry, then you can try using mergeOrSplitBaffles.

If you want to see more information about attachDetach, check out the conversation on the bug reports I was working on (though the second one might not be as relevant if you are only doing attachDetach):

http://www.openfoam.org/mantisbt/view.php?id=572

http://www.openfoam.org/mantisbt/view.php?id=653

novakm January 28, 2013 15:29

Quote:

Originally Posted by mturcios777 (Post 404588)
Hello Martin,

You are fortunate that I decided to see all the new posts, as I unsubscribed to this thread thinking no one would look at it.

I have actually managed to get attachDetach working on all kinds of geometries. But I'm not sure this is what you need exactly. attachDetach is for handling the switching of internal faces to boundary faces or vice-versa (like the opening and closing of internal valves). If all you need is to remove internal patches to clean up geometry, then you can try using mergeOrSplitBaffles.

If you want to see more information about attachDetach, check out the conversation on the bug reports I was working on (though the second one might not be as relevant if you are only doing attachDetach):

http://www.openfoam.org/mantisbt/view.php?id=572

http://www.openfoam.org/mantisbt/view.php?id=653



Thanks for your reply, Marco :) It makes me glad, that someone experienced takes care about us "juniors".

I really need use the attachDetach, because the internal patches form a part of the boundary, as I found today. So I need to create boundary in order to close the geometry.

Is it good idea to use attachMesh application to manage it?

I ask because, at present I am unsuccessfully trying to figuring out how to create faceZone in imported mesh for the correct specifying the meshModifiers.

If you are interested in, you could download the geometry from new mega

https://mega.co.nz/#!vcBRyIwa!S0KYXD...z_oJVHvw0svd3k

-Martin

mturcios777 January 28, 2013 15:46

So are you only interested in changing the mesh so that you have a single domain without internal boundaries, or do you want the internal boundaries so you can open and close the valves during simulation? You can probably use createPatch to combine some of the boundaries that are on the cylinder head, as there are several that could be combined.

novakm January 28, 2013 16:31

Quote:

Originally Posted by mturcios777 (Post 404605)
So are you only interested in changing the mesh so that you have a single domain without internal boundaries, or do you want the internal boundaries so you can open and close the valves during simulation? You can probably use createPatch to combine some of the boundaries that are on the cylinder head, as there are several that could be combined.

I would like to open and close valves. The case will be similar to

http://powerlab.fsb.hr/ped/kturbo/Op...PolyMilano.pdf

page 15 and beyond, but the geometry will be much more complex :confused:

The static geometry should be first step (in my mind), because I can not find any tutorial for OF 21x on the case of comb. engine simulation witch moving valves (don't count kiva...).

Moreover the OF 1.6 - extended project is suspended due to Ansys complaintment, thus, It is not possible to search there.

Do you have any suggestions, where to search for these materials?

mturcios777 January 28, 2013 17:43

I've had to learn a lot by reading the code for the attachDetach modifiers and the engineTopoChangerMesh classes (which can now be recompiled for 2.1.x).

Starting with the static mesh is a good idea. As I said before you should combine a lot of the boundary faces with createPatch to make management easier. Looking at the mesh, you could combine bound_4, bound_5, bound_6, bound_7, bound_18, bound_19, bound_20, bound_21, bound_22 into a single patch as it is continuous (unless you want to specify some heat transfer conditions different on the section coming from the inlet and exhaust, in which case separate bound_20, bound_21 and bound_22 off into their own boundary condition).

wyldckat January 28, 2013 17:44

Greetings to all!

FYI: there is at least one mirror for 1.6-ext: http://www.cfd-online.com/Forums/ope...tml#post404465

Best regards,
Bruno

novakm January 28, 2013 18:25

Quote:

Originally Posted by mturcios777 (Post 404639)
I've had to learn a lot by reading the code for the attachDetach modifiers and the engineTopoChangerMesh classes (which can now be recompiled for 2.1.x).

Starting with the static mesh is a good idea. As I said before you should combine a lot of the boundary faces with createPatch to make management easier. Looking at the mesh, you could combine bound_4, bound_5, bound_6, bound_7, bound_18, bound_19, bound_20, bound_21, bound_22 into a single patch as it is continuous (unless you want to specify some heat transfer conditions different on the section coming from the inlet and exhaust, in which case separate bound_20, bound_21 and bound_22 off into their own boundary condition).

The management of bound_* I have made by "bound_.+" for now. I am agonized with handling of the atta_* (internal/boundary patches). E.g. atta_40 creates a boundary on the sides of valve and atta_39 corresponds to atta_40 without the boundary part. And I would like to attach them to create new boundary patch. That causes headaches to me for past 4 days :mad:

mturcios777 January 28, 2013 18:56

Which engine mesh class are you planning on using (or do you want to make your own)? The choice of mesh type will determine how many different boundaries you actually will need.

novakm January 28, 2013 19:18

I hope that I understands the question.

I would like to use sprayEngineFoam, so I think the move() class for the moving mesh.

In the static case I guess .update()?

(Making my own class seems to me at this point of my knowledge as impossimpible)

mturcios777 January 28, 2013 19:24

sprayEngineFoam won't be enough to do valves. It is only made to move the piston boundary according to your RPM engine geometry. The mesh is stretched in the Z direction and required at least the patches cylinderHead, piston, and liner be defined.

If you want to do valve motion and attachDetach, you will either need to use 1.6-ext, or create your own solver that incorporates all the topological changes you need.

novakm January 29, 2013 04:17

Could you share with me some cases, where is attachDetach added? I have found some, but the cases was attached as examples of bugs. And this type of material seems to me not to be the best starting point :/

I would like to see the structure of the code, if you don't mind to sent me some.

mturcios777 January 29, 2013 13:04

I filed a bug report with a very simple attachDetach mesh. Bascially all you need is to add a movePoints() call in the update() function to properly set the meshPhi on the new boundary patches and you are set.

http://www.openfoam.org/mantisbt/view.php?id=572

Since you will be running this on eventually on engines, be aware that the thermo object will need to be updated as well (rho, hs, etc). There is no single way to do this, and I can't really help you as the solution I came up with is specific to our applications (i.e., I can't share it as the work was done for my employer).

Hope this gets you started well.

novakm January 29, 2013 13:54

Quote:

Originally Posted by mturcios777 (Post 404850)
I filed a bug report with a very simple attachDetach mesh. Bascially all you need is to add a movePoints() call in the update() function to properly set the meshPhi on the new boundary patches and you are set.

http://www.openfoam.org/mantisbt/view.php?id=572

Since you will be running this on eventually on engines, be aware that the thermo object will need to be updated as well (rho, hs, etc). There is no single way to do this, and I can't really help you as the solution I came up with is specific to our applications (i.e., I can't share it as the work was done for my employer).

Hope this gets you started well.

I have already examine the case you posted and it was good source of informations :)

Next problem, I have reached today, is how to incorporate the influence of the valve angle i. e. how to modify the solver and topoStuff to enable "non-vertical" valve movement.

I wonder, if in OF exists some tutorial of simple flow in cylinder ICE with valves, that moves with another angle than 90 deg to piston patch?

mturcios777 January 29, 2013 14:13

I know of no such tutorial, but if you find one let me know where it is! You could try moving the valves with a motion solver like other codes do.

novakm January 29, 2013 15:22

Quote:

Originally Posted by mturcios777 (Post 404861)
I know of no such tutorial, but if you find one let me know where it is! You could try moving the valves with a motion solver like other codes do.

Do you have an example of such motion solver?


All times are GMT -4. The time now is 15:49.