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

polyMesh files, Elements?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 19, 2013, 11:43
Default polyMesh files, Elements?
  #1
New Member
 
---
Join Date: Jan 2013
Posts: 17
Rep Power: 13
gironidegirona is on a distinguished road
Hi you all!

Pleasure to post here (my first post ).

I'm trying to do some freeSurface simulations with OpenFoam, I do the set-up as well as I can but the thing comes when I do have to set where there's VOF (alpha = 1). I'm following the damBreak example which is more or less the same, but the problem comes up when I want to generate the alpha list.

what I want to do is to set some elements on a certain zone with fluid. to do so what I need to do is to know which are the elements on this zone and set the alpha value equal to 1. am I right?

So the question to come is, where the jeck is the list of elements inside polyMesh folder?, the list of alphas in damBreak is as long as nFaces, but I'm working on a 3D problem, there's anyway to know how many alphas do I have to set? are they related with the elements?

Thank you,
gironidegirona is offline   Reply With Quote

Old   January 19, 2013, 17:44
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings gironidegirona and welcome to the forum!

Look into the file "system/setFieldsDict" and you'll learn how you can select a zone in the mesh domain.
When you run the command setFields it will use that dictionary file for applying your requests.

For more example files, run these command:
Code:
find $FOAM_TUTORIALS $FOAM_UTILITIES -name setFieldsDict
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 29, 2013, 06:10
Default
  #3
New Member
 
---
Join Date: Jan 2013
Posts: 17
Rep Power: 13
gironidegirona is on a distinguished road
Thanks wyldckat ,

Thanks for the fast reply, a couple of hours after posting here I realized how to use the setFieldsDict, but the thing I'm facing now is different. I can start a simulation with some predefined alphas, but during the simulation I would like to reduce the number of alphas or to increase it in determined places.

The easiest thing for me is to know the relation with the alpha list and the points of that determine the cell, that way I'll do my check "is this element in the redion I'm checking" and do the operations I need to do?

I hope I've explained myself.

Thanks,

Sergi
gironidegirona is offline   Reply With Quote

Old   January 29, 2013, 19:11
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Sergi,

That's an interesting kind of simulation you're trying to perform. But AFAIK, not very simple to put into practice.

From what I know, you have a few possible solutions:
  • You can try funkySetFields, which is part of swak4Foam. It's like setFields, but extremely powerful and very simple to use. But you'll have to start-stop your simulation once in a while.
  • There is also "simpleFunctionObjects", also part of swak4Foam, which can be used while the simulation is running and do operations similar to funkySetFields, without the need to stop the simulation. But I'm not sure if it provides a feature such as working per zone or using "if cell then"... but it's very likely the best bet.
  • Then there is also OpenFOAM's own "#codeStream" feature, that allows embedding C++ code directly into the case's dictionaries.
These are the possible solutions I can think of. You'll have to investigate further!

Good luck! Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 30, 2013, 03:56
Default
  #5
New Member
 
---
Join Date: Jan 2013
Posts: 17
Rep Power: 13
gironidegirona is on a distinguished road
Pretty interesting Bruno thank you very much!

Actually yesterday I was writing a python program to stop the simulation (seting and endTime after writing data and the continue with and endTime = endTime + writeInterval)

I'll try the FunkysetFields, I think It'll meet my purpose.

Moreover is it simple to change boundary conditions (considering that I stop the simulation and I'm able to write the time folders). Imagine I want to set a PID for the inlet and change the flow depending on the results I get.

Thanks,

Sergi
gironidegirona is offline   Reply With Quote

Old   January 30, 2013, 17:28
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Sergi,

implementing a PID... nice! Although I'm not familiar with any such implementation on OpenFOAM...

I think swak4Foam has some functionality for using Python controls directly in OpenFOAM... then again, it might need pythonFlu for the ability to control boundary conditions directly with Python code. You'll have to research more on this topic.
You can find references to pythonFlu in swak4Foam's wiki page.

Either way, it should be possible to do what you want, but coding is definitely involved! Either in Python or C++.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 4, 2013, 05:28
Default
  #7
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
Quote:
Originally Posted by gironidegirona View Post
Actually yesterday I was writing a python program to stop the simulation
Hi,

do you know pythonflu? Just saw that you know python so why not using
the OF python wrapper
elvis is offline   Reply With Quote

Reply

Tags
cell, element, freesurface, mesh, polymesh

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] Overlapping elements Anorky ANSYS Meshing & Geometry 6 November 6, 2017 09:22
[ICEM] Mesh along axis for a wedge gives elements with extreme aspect ratio sangrampp ANSYS Meshing & Geometry 0 November 17, 2010 07:57
[ICEM] Negative Volumes & 7 node HEXA elements mr_stoked ANSYS Meshing & Geometry 1 September 21, 2010 13:45
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 11:56
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 21:51


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