|
[Sponsors] |
July 26, 2011, 18:16 |
Options for setFields
|
#1 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17 |
Hi all,
I need to define a setFieldsDict for a non-box region. I am aware of swak4Foam and funkySetFields. However, I do not need all that sophistications. Is it possible to define parts (blocks) of the mesh for a zoneToCell instead of a boxToCell (just like the definition of porous media)? If yes, how can I do it? I need some descriptions .... like how to define the zones? (e.g. How to name the zone files?) How to add the zones in the setFieldsDict? Best regards, Hisham |
|
July 27, 2011, 13:13 |
|
#2 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
But suite yourself Quote:
Bernhard |
|||
July 27, 2011, 16:52 |
|
#3 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17 |
Hi Bernhard,
Thanks a lot for your response. You are great ... so as swak4Foam .. It is just that I needed to do that thing quickly with the bread knife ... I will use funkySetFields after all but I did not invest enough time in learning it until now and the task seemed easy enough for setFields ... But I guess it is a good chance to start learning it. Thanks a lot for your great contributions! I will try your idea (it seems like the way to go with OF) Best regards, Hisham |
|
July 27, 2011, 18:43 |
setFields zoneToCell (applications of setFields to mesh blocks)
|
#4 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17 |
I got it. I post here for future readers.
1. In the blockMeshDict, define the cellZone names for required blocks: e.g. (from the damBreak example) blocks ( hex (0 1 5 4 12 13 17 16) cellZoneName (23 8 1) simpleGrading (1 1 1) hex (2 3 7 6 14 15 19 18) (19 8 1) simpleGrading (1 1 1) hex (4 5 9 8 16 17 21 20) (23 42 1) simpleGrading (1 1 1) hex (5 6 10 9 17 18 22 21) cellZoneName (4 42 1) simpleGrading (1 1 1) hex (6 7 11 10 18 19 23 22) (19 42 1) simpleGrading (1 1 1) ); 2. In the setFieldsDict, defaultFieldValues ( volScalarFieldValue alpha1 0 ); regions ( zoneToCell { name "cellZoneName"; fieldValues ( volScalarFieldValue alpha1 1 ); } ); |
|
September 21, 2011, 20:03 |
running the damBreak tutorial after using makeAxialMesh utility
|
#5 |
New Member
Pallav Jha
Join Date: Apr 2011
Posts: 17
Rep Power: 15 |
Hello Hisham and Bernhard,
I am working on a modified damBreak case (http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2007/HassanHemida/Hassan_Hemida_VOF.pdf) to study the free surface tracking. I wanted to make the case axisymmetric; so I modified the mesh using blockMeshDict and then used setFields to assign alpha1 values. I then used the makeAxialMesh utility, followed by collapseEdges, to make the case axisymmetric. I also added the new patches to p_rgh, U, alpha1 files. Then I run decomposePar. However, at this point, I get an error saying that "keyword frontAndBack_pos is not defined in 0/alpha1::boundary" (which makes sense because after I use setFields, the contents of alpha1 file change to numbers 1 or 0 ) Please let me know if you have any ideas to solve this problem. Thanks and regards. Pallav |
|
September 22, 2011, 01:50 |
|
#6 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17 |
Hi Pallav,
It would be a good idea to compress your case into a single file and attach it to your post. A full copy paste of your error message (use the quote tags from the toolbar) also makes things easier. By doing that it is easier for others to give ideas on what may be wrong! Also, starting a new post would be a good idea, in case there is no post that is not about the same problem (e.g. the same error message). Back to your problem: Does it run without decomposePar? Best regards, Hisham |
|
September 22, 2011, 06:29 |
|
#8 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
September 23, 2011, 02:56 |
|
#9 |
New Member
Pallav Jha
Join Date: Apr 2011
Posts: 17
Rep Power: 15 |
||
February 20, 2012, 12:59 |
SetFields
|
#10 |
Senior Member
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 14 |
Dear friends
For the HeatTransfer->buoyantBoussinsqSimpleFoam->HotRoom problem: I wrote 1. In the blockMeshDict: blocks ( hex (0 1 2 3 4 5 6 7) cellZoneName (20 20 20) simpleGrading (1 1 1) ); 2. In the setFieldsDict, defaultFieldValues ( volScalarFieldValue alphat 0 ); regions ( zoneToCell { name "cellZoneName"; fieldValues ( volScalarFieldValue alphat 1 ); } But its not working, could you help me? |
|
February 20, 2012, 13:54 |
|
#11 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17 |
Hi Goutam
It is easier to help if you post the error message generated by OF. In the case you outlined, it is easier to assign a uniform internal field value for alphat in its file in the 0 directory (for the whole domain is a single zone) I have introduced the editions you wrote and it worked fine. It is highly probable that you need to copy the T.org file to a T file in the 0 directory: Code:
:~/openfoam210/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0$ cp T.org T Hisham |
|
February 21, 2012, 06:34 |
|
#12 |
Senior Member
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 14 |
Dear Hisham,
Thanks for your reply. I have copied T.org to T before I run the problem. I did this. When I run setFields, I got the following massage: FOAM Warning: From function zoneToFace:: combine (topoSet&, const bool) in file sets/faceSources/zoneToFace/zoneToFace.C at line 86. Cannot find any faceZone named cellZoneName Valid names are 0 ( ) Setting patchField values of volScalarField alphat End What I will do, can you please help me? I am trying to solve this for the last 7 days. Can I send you my files? I set the model for laminar instead of turbulent and I did the changes that required. Only, setFields option are not working when I use cellZoneName. |
|
February 21, 2012, 06:42 |
|
#13 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17 |
From the error message, it seems that the problem lies in the zoneToFace assignment in the setFieldsDict.
Please zip the case up in one file and attach it to a reply! or maybe paste the setFieldsDict file in your reply Hisham |
|
February 21, 2012, 07:28 |
Hot Room laminar case
|
#14 |
Senior Member
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 14 |
Dear Hisham
Please see the attached zip file. Thanks Goutam |
|
February 21, 2012, 07:49 |
|
#15 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17 |
I'm not sure what you want to do exactly. But the error is generated because you provide a zoneToCell data to a zoneToFace keyword. So you either have to change the line number 25 of the setFieldsDict to "zoneToCell" instead of "zoneToFace" or else provide valid data to the zoneToFace function
|
|
February 21, 2012, 08:05 |
|
#16 | |
Senior Member
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 14 |
Quote:
Firstly, I want to use bouyant force for the laminar case for 3D geometry. I found that this is the nearest solver to do this. Before, I used icoFoam solver for p, U and T, but for buoyant force, its not working. When I consider a pipe flow problem, then the setFields command is not working. I did meshing in Fluent and I use fluentMeshToFoam file.msh command. After that I checked the meshing by checkMesh command. its fine. Regards Goutam |
||
February 21, 2012, 08:18 |
|
#18 |
Senior Member
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 14 |
||
January 28, 2014, 10:37 |
Options for setFields
|
#19 |
New Member
James Feng
Join Date: Dec 2013
Posts: 21
Rep Power: 12 |
I like the "zoneToCell" option, better than the "boxToCell" one. Can we use the "zoneToCell" option for the wedge cells in an axisymmetric case?
|
|
March 24, 2018, 22:22 |
setFields for multiple components of a phase
|
#20 |
Member
Viraj Belekar
Join Date: Jun 2016
Posts: 68
Rep Power: 10 |
Hello everyone,
I am using reactingTwoPhaseEulerFoam for two multicomponent phases analysis. I want to use interfaceCompositionPhaseChangePhaseSystem utility in OpenFOAM to take care of one of the components of a phase. My geometry is a cylindrical vessel. I want to set the volume fraction in such a way that the bottom 45% part of the vessel contains 60% volume fraction of component A of phase 1 and 1% volume fraction of component B of phase 1 and the rest 39% in the bottom 45% fill volume of the vessel is all phase 2. The upper 55% is 100% phase 2. What I was thinking is define the entire internal field with for the entire volume of the cylinder with 60% component A of phase 1, 1% of component B of phase 1 and 39% of phase 2. Then I am trying to use setFieldsDict for the above 55% volume to be 100% phase 2 so that it deletes the above mentioned combination for the above 55% of the vessel and replaces it entirely with phase 2. But this doesn't work! Can anyone please help me with this? Thanks Viraj |
|
Tags |
setfields, setfieldsdict, zonetocell |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Remeshing with User Defined Options | ChristianF | CFX | 2 | September 24, 2014 10:19 |
How do I select solver options for external flow over an aircraft by fluent? | hadieliasi | FLUENT | 5 | May 2, 2011 04:54 |
Post processing: Hard-copy save options and image quality | beguxa | FLUENT | 3 | November 10, 2010 18:41 |
It would be nice to have application options abbreviated! | lakeat | OpenFOAM Running, Solving & CFD | 0 | September 16, 2009 23:22 |
Surface tension options for VOF models | chapelle | FLUENT | 4 | September 20, 2005 04:49 |