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

Cylindrical coordinates ?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2010, 12:51
Post Cylindrical coordinates ?
  #1
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
Hi Guys, i am new to openfoam, my question is that:

If i want to the solve the Navier-Stokes equations in cylindrical coordinates, i must just define my coordinates system to cylindrical one (r, theta,z)?

if so, what about the operators like "laplacian","divergence", for example: div(phi), they will be automatically used in cylindrical coordinates? or we must write new definitions for them in cylind. coord.?

thanks a lot
T.D. is offline   Reply With Quote

Old   September 16, 2010, 11:05
Default
  #2
Senior Member
 
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17
herbert is on a distinguished road
Hi T.D.,

please search the forum before opening a new thread. I think you will get more than 100 matches on this topic.
herbert is offline   Reply With Quote

Old   September 16, 2010, 11:42
Default
  #3
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
Hi Herbert,

yes indeed i searched and found many matches, but they were not clear.
I wish i will get a clear answer to my question.
at least if you know, can you help me? i will be so thankful to you

thanks a lot
T.D. is offline   Reply With Quote

Old   September 17, 2010, 03:01
Default Cylindrical coordinates?
  #4
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi T.D.
I hope you are doing very well.
As I know in OF equations are discretised in Cartesian coordinate. Would you please tell me why you are so interested in cylindrical coordinate? May be you can solve your problem in Cartesian coordinate.
Best regards
Good luck

Ata
ata is offline   Reply With Quote

Old   September 17, 2010, 05:29
Post Hi
  #5
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
Hi ata,
this is my model in the attached image
yes indeed i just need to solve it in (r,z) only
because it is a flow between two parallel disks, one is rotating and the other is stationary.(axisymmetric)

Can you help me how to do that?

Thanks a lot for you
Attached Images
File Type: jpg MyModel.JPG (39.8 KB, 320 views)
T.D. is offline   Reply With Quote

Old   September 18, 2010, 02:54
Default
  #6
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi T.D.
How are you?
I hope you are doing very well.
As I know you can solve your problem in Cartesian coordinate with rotating BC on walls. If you want an analytical solution then cylindrical coordinate is proper for you but in numerical solution it is no matter.
Are you agree with me?
Best regards

Ata
ata is offline   Reply With Quote

Old   September 18, 2010, 15:00
Post Hi ata
  #7
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
Hi ata,
thanks a lot, you are so kindful
how are you,
i attached an image , if you see you will understand what i need exactly.
can you help me exactly what to do?

thanks a lot my brother

rk: i am new to openfoam
Attached Images
File Type: jpg myflow.JPG (35.7 KB, 204 views)
T.D. is offline   Reply With Quote

Old   September 20, 2010, 03:51
Default
  #8
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi T.D.
How are you? I hope you are doing very well. Excuse me for delay.
I think i can help you. As I see you can use Cartesian coordinate and for wall 1 must use rotating wall. As I know rotating wall boundary condition has been implemented in OpenFOAM previously. For wall 3 you can use stationary wall as boundary condition and there is no need to cylindrical coordinate. In your picture boundary conditions for walls 2 and 4 are not clear. But if they are rotating or stationary there is no problem.
You can see
http://www.cfd-online.com/Forums/ope...-cylinder.html
may be it was useful for you.
Best regards
Good luck bro.

Ata
ata is offline   Reply With Quote

Old   September 20, 2010, 06:07
Post Hi ata
  #9
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
Hi ata,
How are you?
Thank you so much, yes indeed 2, and 4 are also rotating.
But I still have a question, what about the Value [V_setta = Omega * r]?
How can i put that value for the boundary condition at rotating wall(1)? since it is equal to a constant Omega times the spatial coordinates r?

Another Question, i want to compute the strain tensor E:
E=(1/2)*(grad(U)+transpose(grad(U)))
i found in programmers guide that it is: symm(fvc::grad(U))
but when i write in my .C file
E=fvm::symm(fvc::grad(U));
i get this error:
error: 'symm' is not a member of 'Foam::fvm'

by the way i defined also E as a VolTensorField

Help me please

Thanks a lot
T.D. is offline   Reply With Quote

Old   September 20, 2010, 07:55
Default
  #10
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi T.D.
I'm fine and I hope you are too.
About your first question. In rotating wall BC you give omega, axis of rotation and its origin not linear velocity. It will be computed by the solver.
About your second question. Examine
volSymmTensorField E = fvc::grad(U);
I hope this works.
Good luck
Be happy
Best regards

Ata
ata is offline   Reply With Quote

Old   September 20, 2010, 10:44
Default
  #11
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
Hi ata,
thanks a lot, but E is not aqual to grad(U) as you said
E=(1/2)*(grad(U)+transpose(grad(U)));
and i saw in guide that there exists already a functions that computes (grad(U)+transpose(grad(U))) and is called "symm"

but when i use it like
E=fvm::symm(fvc::grad(U));

i get error:
error: error: 'symm' is not a member of 'Foam::fvm'

so i think i have a problem calling the already installed functions in openfoam like sqrt, or mag, you see
i hope you understood me now

thanks a lot
you are so kind

T.D.

Last edited by T.D.; September 20, 2010 at 11:41.
T.D. is offline   Reply With Quote

Old   September 21, 2010, 02:03
Default
  #12
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi T.D.
How are you? I hope you are doing very well.
You are true. Examine:
volTensorField Gr=fvc::grad(U);
volSymmTensorField E = symm(Gr);
volTensorField GrTr=Gr.T();
volSymmTensorField Tr = symm(GrTr);
E=E+Tr;
Good luck
Best regards

Ata
ata is offline   Reply With Quote

Old   September 21, 2010, 08:20
Post U r Great
  #13
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
Hi ata,
i am fine, you, how are you?

thanks a lot, yes it works now, but
if symm(Gr) is = 1/2 (Gr + Gr.T() )
then why you defined and added Tr tensor, i don't understand why ?

it will be suffiecient at line E=symm(Gr) only , no?

I have a question please, later how can i view E values in paraView, how to export them?

thanks a lot for your patience and help

yours,

T.D.

Last edited by T.D.; September 21, 2010 at 09:02.
T.D. is offline   Reply With Quote

Old   September 21, 2010, 09:29
Default
  #14
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi T.D.
If you did not get error it is true. Use it.
For your second question. Beside any solver source code (i.e. icoFoam) there is a file createFields. In it pressure. velocity and other things creates. You can use it. May this is true for your case:
Info<< "Reading field E\n" << endl;
volSymmTensorField E
(
IOobject
(
"E",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);

Add it to the end of your createFields file of your solver. Then at your case (problem) in folder "0" similar to file "U" build a file. Name it "E". With contents like this:
dimensions [0 0 -1 0 0 0 0];

internalField uniform (0 0 0 0 0 0);

boundaryField
{
inlet
{
type fixedValue;
value uniform (0 0 0 0 0 0);
}
fixedWalls
{
type zeroGradient;
}
outlet
{
type zeroGradient;
}
simetry
{
type symmetryPlane;
}
frontAndBack
{
type empty;
}
}
Maybe there is better ways but I know this way.
Good luck
Bets regards

Ata
ata is offline   Reply With Quote

Old   September 21, 2010, 09:52
Default Thanks
  #15
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
hi
thanks brother
yes it worked fine

thank you so much

see you later

yours,

T.D.

Last edited by T.D.; September 21, 2010 at 12:21.
T.D. is offline   Reply With Quote

Old   September 22, 2010, 05:56
Smile to simlify last message
  #16
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
Hi to simlify my last message

here is My model
what i need to write is the syntax for the last term
at write of equation 2


see attached file
Attached Images
File Type: jpg MyModel.JPG (39.8 KB, 57 views)
T.D. is offline   Reply With Quote

Old   September 25, 2010, 04:08
Default
  #17
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi T.D.
I'm fine. How are you? hope you are doing very well.
For your first question define nu_new in the create field as a volscalerfield and calcaulate it before using it in the code.
For your second question see the boundary conditions for pressure in one tutorial.
For your third question it is not clear for me. Please explain more.
Good luck
Best regards

Ata
ata is offline   Reply With Quote

Old   September 26, 2010, 16:37
Smile Thanks
  #18
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
Hi ata,
how are you?
i am fine, and thank you so much
i will try what you told me,
you can forget about the third question , its ok

thank you so much

T.D.
T.D. is offline   Reply With Quote

Reply

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
Finite Volume Method For Cylindrical Coordinates falopsy Main CFD Forum 45 August 14, 2023 22:14
working in cylindrical coordinates in fluent Randheer Yadav FLUENT 2 January 18, 2015 17:25
SIMPLE algorithm in 3D cylindrical coordinates zouchu Main CFD Forum 1 January 20, 2014 18:02
Unit Vector profile, cylindrical coordinates Felix CFX 3 February 6, 2009 08:34
Calculation in cylindrical coordinates Franz Wingelhofer CFX 0 December 28, 1999 08:46


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