# internal field

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

 April 26, 2012, 05:56 internal field #1 Member   anonymous Join Date: Mar 2012 Posts: 45 Rep Power: 4 Hi! I have a cylinder and I want to simulate the concentration. my problem is: I have the cylinder split in 20 parts and I want to say that 10 volums are C=0.5 and the others 10 volums C=-0.5. how can I put this in the /0?? becouse in internalField can only be one value ... and I want to specify the volums, not the surfaces Thanks!

 April 26, 2012, 06:04 #2 Senior Member   Pablo Higuera Join Date: Jan 2011 Posts: 145 Rep Power: 5 You can use setFields for that purpose. Check the damBreak tutorial for an example. Regards

April 26, 2012, 06:36
#3
Member

anonymous
Join Date: Mar 2012
Posts: 45
Rep Power: 4
Quote:
 Originally Posted by Phicau You can use setFields for that purpose. Check the damBreak tutorial for an example. Regards
ok!!! thanks

i have another question, in the example of break damm

defaultFieldValues
(
volScalarFieldValue alpha1 0
);

regions
(
boxToCell
{
box (0 0 -1) (0.1461 0.292 1);
fieldValues
(
volScalarFieldValue alpha1 1
);
}
);

what is box (0 0 -1) (0.1461 0.292 1);?? I know that the second parentesis is the coordinates x,y,z , but (0 0 -1) i don't know what it is.

and in my case that i have a cylinder, how can I describe the coordinates if it's cylindrical??

thanks

 April 26, 2012, 07:49 #4 New Member   Yogesh Bapat Join Date: Oct 2010 Posts: 23 Rep Power: 5 Hello, For cylinderical region you need to use cylinderToCell.

 April 26, 2012, 09:39 #5 Senior Member   Pablo Higuera Join Date: Jan 2011 Posts: 145 Rep Power: 5 All the cells whose center is within a box with lower corner (minX minY minZ) = (0 0 -1) and upper corner (maxX maxY maxZ) = (0.1461 0.292 1) get the alpha1 = 1. Depending on the geometry of the 20 parts you may need to use cylinderToCell as Yogesh says, or you can continue using boxToCell.

April 27, 2012, 03:08
#6
Member

anonymous
Join Date: Mar 2012
Posts: 45
Rep Power: 4
Quote:
 Originally Posted by Phicau All the cells whose center is within a box with lower corner (minX minY minZ) = (0 0 -1) and upper corner (maxX maxY maxZ) = (0.1461 0.292 1) get the alpha1 = 1. Depending on the geometry of the 20 parts you may need to use cylinderToCell as Yogesh says, or you can continue using boxToCell.
ok thanks! but in the cylinder the lower corner and de upper corner which numbers I have to put??

the cylinder is split in 20 similar parts, like 20 small cylinders

 April 27, 2012, 03:19 #7 Senior Member   Pablo Higuera Join Date: Jan 2011 Posts: 145 Rep Power: 5 cylinderToCell has a different input, 2 points and a radius instead of a box: p1 (0 -0.08 0); p2 (0 0.06 0); radius 0.12; libia87 likes this.

 April 27, 2012, 03:21 #8 Member   anonymous Join Date: Mar 2012 Posts: 45 Rep Power: 4 defaultFieldValues ( volScalarFieldValue p 0 ); regions ( cylinderToCell { cylinder (0 0 0) (0 0 2.5) 1.25; fieldValues ( volScalarFieldValue p 1 ); } ); with this setFields give me an error, FOAM FATAL IO ERROR: keyword p1 is undefined in dictionary cylinderToCell what does it mean?

 April 27, 2012, 03:24 #9 Senior Member   Pablo Higuera Join Date: Jan 2011 Posts: 145 Rep Power: 5 It asks for word p1, as you have not specified the points: defaultFieldValues ( volScalarFieldValue p 0 ); regions ( cylinderToCell { p1 (0 0 0); p2 (0 0 2.5); radius 1.25; fieldValues ( volScalarFieldValue p 1 ); } ); libia87 and jiaojiao like this.

April 27, 2012, 03:27
#10
Member

anonymous
Join Date: Mar 2012
Posts: 45
Rep Power: 4
Quote:
 Originally Posted by phicau it asks for word p1, as you have not specified the points: Defaultfieldvalues ( volscalarfieldvalue p 0 ); regions ( cylindertocell { p1 (0 0 0); p2 (0 0 2.5); radius 1.25; fieldvalues ( volscalarfieldvalue p 1 ); } );
thanks!!!!!

 May 18, 2012, 10:18 #11 New Member   Andrea Cristina Join Date: May 2012 Location: Milano Posts: 4 Rep Power: 3 Hi i have this error with the tool cylinderToCell --> FOAM FATAL IO ERROR: keyword fieldValues is undefined in dictionary "::cylinderToCell" Can you help me?

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 121 March 7, 2013 17:21 alessio.nz OpenFOAM 5 April 20, 2011 08:44 T.D. OpenFOAM 5 March 14, 2011 05:48 gunnar OpenFOAM Paraview & paraFoam 4 June 25, 2009 12:00 matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51

All times are GMT -4. The time now is 00:39.