internal field
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! |
You can use setFields for that purpose. Check the damBreak tutorial for an example.
Regards |
Quote:
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 |
Hello,
For cylinderical region you need to use cylinderToCell. |
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. |
Quote:
the cylinder is split in 20 similar parts, like 20 small cylinders |
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; |
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? |
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 ); } ); |
Quote:
|
Hi
i have this error with the tool cylinderToCell --> FOAM FATAL IO ERROR: keyword fieldValues is undefined in dictionary "::cylinderToCell" Can you help me? |
Quote:
|
HI
I get this message after pasting your code to setfeildsdict Setting field default values --> FOAM Warning : From function void setCellFieldType(const fvMesh& mesh, const labelList& selectedCells,Istream& fieldValueStream) in file setFields.C at line 124 Field p not found Setting field region values Adding cells with centre within cylinder, with p1 = (0 0 -0.003), p2 = (0 0 0.003) and radius = 0.003 --> FOAM Warning : From function void setCellFieldType(const fvMesh& mesh, const labelList& selectedCells,Istream& fieldValueStream) in file setFields.C at line 124 Field p not found (I'm guessing this has to do with p file.. but I have p_rgh??? :O) End Can you help please? |
Quote:
I have the same problem!, Did you find a solution? Regards, --Carlos |
Hi Carlos
I solved it using this Quote:
openfoam30/applications/utilities/mesh/manipulation/topoSet/ There is a file called topoSetDict Check it out :D Regards Xoitx |
Quote:
--Carlos |
Quote:
" keyword p1 is undefined in dictionary cylinderToCell " I introduced keyword p1 !!! defaultFieldValues ( volScalarFieldValue alpha.water 1 ); regions ( cylinderToCell { cylinder p1 (-0.83261 0.11118 0); p2 (0.82468 -0.11012 0); radius 0.03; fieldValues ( volScalarFieldValue alpha.water 0 ); } ); Please help me. Ali |
Quote:
" keyword p1 is undefined in dictionary cylinderToCell " I introduced keyword p1 : defaultFieldValues ( volScalarFieldValue alpha.water 1 ); regions ( cylinderToCell { cylinder p1 (-0.83261 0.11118 0); p2 (0.82468 -0.11012 0); radius 0.03; fieldValues ( volScalarFieldValue alpha.water 0 ); } ); Please help me. Ali |
All times are GMT -4. The time now is 07:39. |