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

attachDetach for compressible flow in 1.6-ext

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 28, 2012, 20:25
Default attachDetach for compressible flow in 1.6-ext
  #1
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
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
mturcios777 is offline   Reply With Quote

Old   January 27, 2013, 04:55
Default
  #2
Member
 
Martin Novák
Join Date: Dec 2012
Location: Prague
Posts: 56
Rep Power: 4
novakm is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
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
novakm is offline   Reply With Quote

Old   January 28, 2013, 14:12
Default
  #3
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
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
mturcios777 is offline   Reply With Quote

Old   January 28, 2013, 15:29
Default
  #4
Member
 
Martin Novák
Join Date: Dec 2012
Location: Prague
Posts: 56
Rep Power: 4
novakm is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
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
novakm is offline   Reply With Quote

Old   January 28, 2013, 15:46
Default
  #5
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
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.
mturcios777 is offline   Reply With Quote

Old   January 28, 2013, 16:31
Default
  #6
Member
 
Martin Novák
Join Date: Dec 2012
Location: Prague
Posts: 56
Rep Power: 4
novakm is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
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

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

Old   January 28, 2013, 17:43
Default
  #7
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
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).
mturcios777 is offline   Reply With Quote

Old   January 28, 2013, 17:44
Default
  #8
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,308
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
wyldckat is offline   Reply With Quote

Old   January 28, 2013, 18:25
Default
  #9
Member
 
Martin Novák
Join Date: Dec 2012
Location: Prague
Posts: 56
Rep Power: 4
novakm is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
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
novakm is offline   Reply With Quote

Old   January 28, 2013, 18:56
Default
  #10
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
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.
mturcios777 is offline   Reply With Quote

Old   January 28, 2013, 19:18
Default
  #11
Member
 
Martin Novák
Join Date: Dec 2012
Location: Prague
Posts: 56
Rep Power: 4
novakm is on a distinguished road
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)
novakm is offline   Reply With Quote

Old   January 28, 2013, 19:24
Default
  #12
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
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.
mturcios777 is offline   Reply With Quote

Old   January 29, 2013, 04:17
Default
  #13
Member
 
Martin Novák
Join Date: Dec 2012
Location: Prague
Posts: 56
Rep Power: 4
novakm is on a distinguished road
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.
novakm is offline   Reply With Quote

Old   January 29, 2013, 13:04
Default
  #14
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
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.
mturcios777 is offline   Reply With Quote

Old   January 29, 2013, 13:54
Default
  #15
Member
 
Martin Novák
Join Date: Dec 2012
Location: Prague
Posts: 56
Rep Power: 4
novakm is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
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?
novakm is offline   Reply With Quote

Old   January 29, 2013, 14:13
Default
  #16
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
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.
mturcios777 is offline   Reply With Quote

Old   January 29, 2013, 15:22
Default
  #17
Member
 
Martin Novák
Join Date: Dec 2012
Location: Prague
Posts: 56
Rep Power: 4
novakm is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
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?
novakm is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Flow meter Design CD adapco Group Marketing CD-adapco 3 June 21, 2011 08:33
HELP! HELP! HELP! ext. Flow aerodynamics moya bucho CD-adapco 2 August 6, 2004 03:30
mass flow inlet Denis Tschumperle FLUENT 7 August 9, 2000 02:19
Question on 3D potential flow Adrin Gharakhani Main CFD Forum 13 June 21, 1999 05:18
computation about flow around a yawed cone Tylor Xie Main CFD Forum 0 June 9, 1999 07:33


All times are GMT -4. The time now is 14:38.