CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Sin function as a wall profile (http://www.cfd-online.com/Forums/fluent/114996-sin-function-wall-profile.html)

mozkan26 March 21, 2013 08:27

Sin function as a wall profile
 
Hi all,

I want to create a wall surface as a sine function. Is it a good idea to create it via vertices with NURBS tool or can I use udf for telling Fluent that a straight line is actually a sine function?

Many thanks,

Musa

Far March 21, 2013 11:52

Quote:

Originally Posted by mozkan26 (Post 415492)
Hi all,

I want to create a wall surface as a sine function. Is it a good idea to create it via vertices with NURBS tool or can I use udf for telling Fluent that a straight line is actually a sine function?

Many thanks,

Musa

What do you think about Fluent ;)

mozkan26 March 21, 2013 12:14

Quote:

Originally Posted by Far (Post 415529)
What do you think about Fluent ;)

Sorry Far, couldn`t really get what you are telling.

Far March 21, 2013 12:15

Fluent cannot make changes at geometry level. so you have to make that sine wall in Gambit or any other preprocessor.

mozkan26 March 21, 2013 12:20

Quote:

Originally Posted by Far (Post 415531)
Fluent cannot make changes at geometry level. so you have to make that sine wall in Gambit or any other preprocessor.

Yes I know, you are right, sorry my first post may not really clear. I mean, is it a good approach to create a wall as a sine function with vertices by using NURBS tool in Gambit? Or can I do it with a udf file in Fluent. I am not really good at defining Boundary Profiles with UDF.

Far March 21, 2013 12:21

Easy method is gambit and I would always prefer it.

mozkan26 March 21, 2013 12:22

Quote:

Originally Posted by Far (Post 415533)
Easy method is gambit and I would always prefer it.

Thank you very much for your reply Far. I will try it in Gambit and hope I won`t face any meshing problem near surface.

j_h_86 March 27, 2013 07:40

Sorry to bring up this post again.

I am investigating a similar case. I have implemented the sinus-profile into FLUENT successfully.

Now I want to pose a non constant wall temperature at this boundary, using an UDF. I found several example scripts (in this case for a pressure profile), but they always assume one constant coordinate (BC is a straight line). In my case, the y coordinate is a function of the x coordinate. How can I implement this?

Example scipt for a "straight" BC:

#include "udf.h"
DEFINE_PROFILE(pressure_profile,t,i)
{
real x[ND_ND];
/* this will hold the position vector */
real y;
face_t f;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
y = x[1];
F_PROFILE(f,t,i) = 1.1e5 - y*y/(.0745*.0745)*0.1e5;
}
end_f_loop(f,t)
}


Thank you in advance!

mozkan26 March 27, 2013 07:47

I am not expert in UDFs but just as a suggestion, what will happen if you change y=x[1] line with your y(x) sine function?

j_h_86 March 27, 2013 08:02

Quote:

Originally Posted by mozkan26 (Post 416706)
I am not expert in UDFs but just as a suggestion, what will happen if you change y=x[1] line with your y(x) sine function?

Well, this would help.

But what about

real x[ND_ND]; ?

My boundary has no constant x value...

mozkan26 March 27, 2013 08:08

Quote:

Originally Posted by j_h_86 (Post 416711)
Well, this would help.

But what about

real x[ND_ND]; ?

My boundary has no constant x value...

Oopps!! You are right. Here is where we need an expert. I wonder the answer too, it may help me at some point.

Far March 27, 2013 12:55

http://www.youtube.com/watch?v=U_z-Ufn0-kg

j_h_86 March 28, 2013 11:58

Quote:

Originally Posted by Far (Post 416793)

Dear Far,

could you link me to a tutorial, where a non-straight boundary is modelized in an UDF-file?

I am not into UDF a lot and tutorials seem to be very rare on the internet.

Best regards

Far March 28, 2013 12:01

The person who has created this video is also a forum member. You can contact him through youtube for futher details as I am not a UDF guy :D


All times are GMT -4. The time now is 06:55.