CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CD-adapco (http://www.cfd-online.com/Forums/cd-adapco/)
-   -   Help!trasient inlet user subroutine (http://www.cfd-online.com/Forums/cd-adapco/54292-help-trasient-inlet-user-subroutine.html)

chun January 9, 2005 10:25

Help!trasient inlet user subroutine
 
Dear sirs,

I want to compute a problem with transient inlet, but I do not know how to solve it in subroutine. The boundary condition equation is descirbed as follow:

U=cosh(Y)*cos(X-TIME)

V=sinh(Y)*sin(X-TIME) here, Y=0--3,X=0--8 How can I compile it in inlet subroutine ?And how to I define the run time in user subrotine? Can anybody help me in detail?Thank you in advance.

yacine January 10, 2005 07:04

Re: Help!trasient inlet user subroutine
 
One suggestion for computing the time is to compute it in the soubroutine as: ITER*timestep ITER: is the iteration number provided by STAR timestep: the one you are using

in the soubroutine you have the coordinates of the cells at the boundaries so you can use those for the function you planning to use

To find out the name of the variables used in STAR check the file nom.inc and usrdat.inc

good luck

matej January 11, 2005 04:34

Re: Help!trasient inlet user subroutine
 
well,

in user routine bcdefi.f specify these equations, as you put it in your question here.

the star will understand U,V,W as velocities, UCL,VCL,WCL are velocities in given local coord. system. TIME is time in the simulation, so there is the way how to input time in your simulation through the TIME variable. In star GUI specify, that the inlet is given by "user define" run star, it will compile it and run the case....

matej

chun January 11, 2005 21:19

Re: Help!trasient inlet user subroutine
 
Dear matej,

Thank you for your kindness.Yet I still have a question here:How can I define Y from 0--3 and X from 0--8,here 3 is not YMax?And the water surface is varying with time(a kind of sine wave),how can I describe it in star-cd ?Thank you !

chun January 12, 2005 11:40

Re: Help!trasient inlet user subroutine
 
Dear matej, In star-cd, can I let U(i,j,k) to be the velocity at everywhere?And let X(i) represent X values of every cell? Thanks

Jörn Beilke January 12, 2005 15:00

Re: Help!trasient inlet user subroutine
 
if X.ge.0 and X.le.8 and Y .....

U=cosh(Y)*cos(X-TIME)

V=sinh(Y)*sin(X-TIME)

ENIF

if you write this with the correct syntax it should work.

chun January 13, 2005 22:13

Re: Help!trasient inlet user subroutine
 
Dear Jörn Beilke ,

At the boundary,here,X is a constant,the velocity is only varying with Y and TIME,do we should define it as you said ( if X.ge.0 and X.le.8 and Y ..... )? In star-cd ,do X,Y,Z represent array X(i),Y(i),Z(i)?And in my question, the water surface is moving like Sine wave, how can we indicate it? Is the velocity at the boundary is needed enough?

matej January 14, 2005 04:30

Re: Help!trasient inlet user subroutine
 
HI,

I'm not sure I do follow what you want to do. In first post you said, that the X and Y (coordinates) are changing Y=0--3,X=0--8. In your last post, you said, that X is constant. bit puzzling, but anyway.

If X is not changing, or is not coordinate which you said is changing from 0--8, you do not need to put if X.ge.0 and X.le.8 in the IF condition.

Yes, you're right - X and Y and Z are coordinates in star routine.

the water stuff: Do I understand correctly you model two-phase flow with water and some gas, and you want to have the water-gas interface going through the inlet, and you want to specify the waves of the surface on the inlet?

matej

chun January 14, 2005 10:31

Re: Help!trasient inlet user subroutine
 
Dear matej,

Thank you first!

Yes ,you are right,I am modeling two-phase flow with water and air ( ocean wave motion ),and want to specify the waves of the surface on the inlet. How can I make it? My problem is two-dimension ocean wave of X-Y coodinate.Is the velocity at the boundary is enough,or anything else needed? yours,sincerely


All times are GMT -4. The time now is 09:53.