Tangential velocity
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Tangential velocity
Hello everyone,
I made a simple cylinder and i'm trying to put a tangential velocity on the inlet. I only used the GUI and i wrote the equations to transform the cartesian to cylindrical coordinates in the user profile direction but my fluid doesn't enter with the specificed angle all around the inlet as you can see in the attached figure. I would be grateful if you could help me with an example to understand how does it work or, if i have to modify a subroutine, which one do I have to modify.
Best regards,
Robert
I made a simple cylinder and i'm trying to put a tangential velocity on the inlet. I only used the GUI and i wrote the equations to transform the cartesian to cylindrical coordinates in the user profile direction but my fluid doesn't enter with the specificed angle all around the inlet as you can see in the attached figure. I would be grateful if you could help me with an example to understand how does it work or, if i have to modify a subroutine, which one do I have to modify.
Best regards,
Robert
-
- Posts: 284
- Joined: Fri Dec 04, 2015 1:42 pm
Re: Tangential velocity
Hello
Could you post the equations that you set in the inlet and give additional information about your problem in order to understand what are you solving.
Regards
Luciano
Could you post the equations that you set in the inlet and give additional information about your problem in order to understand what are you solving.
Regards
Luciano
Re: Tangential velocity
Hello, thank you for your interest.
Those are the settings i wrote in user profile: x=1;
y=1;
z=10;
r=sqrt(x^2+y^2);
o=atan(y/x);
a=(60/360)*2*pi;
V=1;
vt=V*cos(a);
vr=V*sin(a);
dir_x = -vt*sin(o)-vr*cos(o);
dir_y = vt*cos(o)-vr*sin(o);
dir_z =0;
What i'm trying to do is to impose a certain angle to the velocity on inlet as there would be some guide vanes upstream the inlet. Attached you have setup.xml file, the geometry made in salome ( you have to change Test.XML to Test.hdf, it didn't let me to upload .hdf file) and a picture of how i would like the velocity to enter all around the inlet. Let me know if you can't open the geomtry file and i will do some screenshots.
Regards,
Robert
Those are the settings i wrote in user profile: x=1;
y=1;
z=10;
r=sqrt(x^2+y^2);
o=atan(y/x);
a=(60/360)*2*pi;
V=1;
vt=V*cos(a);
vr=V*sin(a);
dir_x = -vt*sin(o)-vr*cos(o);
dir_y = vt*cos(o)-vr*sin(o);
dir_z =0;
What i'm trying to do is to impose a certain angle to the velocity on inlet as there would be some guide vanes upstream the inlet. Attached you have setup.xml file, the geometry made in salome ( you have to change Test.XML to Test.hdf, it didn't let me to upload .hdf file) and a picture of how i would like the velocity to enter all around the inlet. Let me know if you can't open the geomtry file and i will do some screenshots.
Regards,
Robert
-
- Posts: 284
- Joined: Fri Dec 04, 2015 1:42 pm
Re: Tangential velocity
Hello,
If you specify the velocity direction using a user profile, for each boundary face you can access to the (x,y,z) coordinate of the face center, so with this information you can set
This will give you an anti-clockwise tangential velocity. When you check the velocity field you have to take into account that the velocities are shown at the cells center and not at the face center.
Regards,
Luciano
If you specify the velocity direction using a user profile, for each boundary face you can access to the (x,y,z) coordinate of the face center, so with this information you can set
Code: Select all
r=sqrt(x^2+y^2);
dir_x = -y/r;
dir_y = x/r;
dir_z =0;
Regards,
Luciano
Re: Tangential velocity
It looks great! But i tried to follow you instructions and it seems I can't make it( as you can see attached). If it's not too much, could you please share your setup file? And I would be grateful if you could explain step by step how did you make the velocity field. I tried to apply cell centers filter to the extract block-fluid domain filter but when i apply the glyph I can't see anything and I can't even choose vector or scalars.
And another question, is it possible to declare a vector? For example i want "a" to take values from 0 to 360 and so on.
Thanks for your time.
Regards,
Robert
And another question, is it possible to declare a vector? For example i want "a" to take values from 0 to 360 and so on.
Thanks for your time.
Regards,
Robert
-
- Posts: 284
- Joined: Fri Dec 04, 2015 1:42 pm
Re: Tangential velocity
Hello,
I attach the setup, results and a state file to load in Paravis. Yo don't need to apply a cell center/extract block filters. Only with a slice an a glyph is enough.
Where do you want to declare a vector?? Paravis or Saturne?
Regards,
Luciano
I attach the setup, results and a state file to load in Paravis. Yo don't need to apply a cell center/extract block filters. Only with a slice an a glyph is enough.
Where do you want to declare a vector?? Paravis or Saturne?
Regards,
Luciano
- Attachments
-
- RESU.tar.gz
- (1.18 MiB) Downloaded 311 times
Re: Tangential velocity
Hello,
I would like to add the vector in code_saturne. And about the visualisation in Paraview, i usually apply an extract block- fluid domain-> cell data to point. I will try to apply directly cell points. Thanks a lot!
Regards,
Robert
I would like to add the vector in code_saturne. And about the visualisation in Paraview, i usually apply an extract block- fluid domain-> cell data to point. I will try to apply directly cell points. Thanks a lot!
Regards,
Robert
Re: Tangential velocity
Hello,
I managed to fix the angle for the previous case but now I have another question. Let's say that we have a simple cylinder ( Figure 1) and this time the inlet is the one shown with red. Is there any way to set a volumic flow rate as boundary condition and to input an angle A as shown in Figure 2 using the user profile? So far I managed to control the angle but in the axial direction( z axis) and I want to control it in (x,y) plan in order to get a swirl.
Thank you,
Robert
I managed to fix the angle for the previous case but now I have another question. Let's say that we have a simple cylinder ( Figure 1) and this time the inlet is the one shown with red. Is there any way to set a volumic flow rate as boundary condition and to input an angle A as shown in Figure 2 using the user profile? So far I managed to control the angle but in the axial direction( z axis) and I want to control it in (x,y) plan in order to get a swirl.
Thank you,
Robert
-
- Posts: 4209
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Tangential velocity
Hello,
No, there is currently no alternative to this than using user subroutines (cs_user_boundary_conditions.f90). I'll need to check if we already have examples for swirls in the Doxygen documentation, and possibly add one, as inlets with swirls are a (moderately frequently) recurring question...
In any case, if there is no example (have not checked), I could send you a old example, which should still need improvement.
Best regards,
Yvan
No, there is currently no alternative to this than using user subroutines (cs_user_boundary_conditions.f90). I'll need to check if we already have examples for swirls in the Doxygen documentation, and possibly add one, as inlets with swirls are a (moderately frequently) recurring question...
In any case, if there is no example (have not checked), I could send you a old example, which should still need improvement.
Best regards,
Yvan
Re: Tangential velocity
Hello,
Thank you for the answer. Anything is helpful, it doesn't matter if it's a bit old. Let me know if you need my mail adress.
Best regards,
Robert
Thank you for the answer. Anything is helpful, it doesn't matter if it's a bit old. Let me know if you need my mail adress.
Best regards,
Robert