CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Phoenics (https://www.cfd-online.com/Forums/phoenics/)
-   -   Inlet Profile (Please, I really need some help...) (https://www.cfd-online.com/Forums/phoenics/52048-inlet-profile-please-i-really-need-some-help.html)

Bernardo Santos Aflalo April 12, 2006 19:14

Inlet Profile (Please, I really need some help...)
 
Hi!

I am a last year Mechanical Engineering student and I am working on a simulation of a flow over a backward step, and Im having problems in the non unifom inlet profile.

I created a user defined object, a patch of this object and a in form of it. My group 13 of the q1 file looks like this:

************************************************** ********* Group 13. Boundary & Special Sources

PATCH (TESTE1 ,EAST ,1,0,0,0,5,20,1,1)

WALLCO = GRND3 ************************************************** ********* Echo InForm settings for Group 13 inform13begin (SOURCE OF U1 AT INLET1 IS ZG^2 WITH IMAT<100) inform13end ************************************************** *********

and in the objetcs list:

> OBJ, NAME, INLET1
: OBJ, POSITION, 4.000000E-01, 0.000000E+00, 8.000000E-02
: OBJ, SIZE, 0.000000E+00, 1.000000E-01, 1.900000E-02
: OBJ, CLIPART, default
: OBJ, ROTATION24, 1
: OBJ, TYPE, USER_DEFINED

Am I doing the right procedures? Please, I dont know what more can I do! What´s wrong in this code???

Best Regards,

Bernardo Aflalo

Mike April 13, 2006 07:01

Re: Inlet Profile (Please, I really need some help
 
There is no mass injected at this inlet. You need a source for p1 equal to density*uin). Below is an INFORM example for two-user-defined inlets to represent the wind profile of an atmospheric boundary layer. Your case is much simpler, but this should give you the idea of how to do it.

************************************************** ********** Group 13. Boundary & Special Sources

INLET (BLINL ,LOW ,3,0,0,0,0,0,1,1) VALUE (BLINL ,P1 , 0.000000E+00) VALUE (BLINL ,U1 , 0.000000E+00) VALUE (BLINL ,V1 , 0.000000E+00) VALUE (BLINL ,W1 , 0.000000E+00) VALUE (BLINL ,KE , 0.000000E+00) VALUE (BLINL ,EP , 0.000000E+00)

INLET (BLINW ,WEST ,5,0,0,0,0,0,1,1) VALUE (BLINW ,P1 , 0.000000E+00) VALUE (BLINW ,U1 , 0.000000E+00) VALUE (BLINW ,V1 , 0.000000E+00) VALUE (BLINW ,W1 , 0.000000E+00) VALUE (BLINW ,KE , 0.000000E+00) VALUE (BLINW ,EP , 0.000000E+00)

WALLA = 2.000000E-02 ;WALLB = 0.000000E+00 EGWF = T WALLCO = GRND5 ************************************************** **********

inform13begin REAL(VREF,REFHEIGHT,RHIN,ROUGHH,AKAP,ZRFDRH) REAL(VTAU,VTAUX,VTAUZ) REAL(VELX,VELZ,IN_ANG,PI) ** constants AKAP=0.41;PI=3.1415926 ** wind speed, reference height, roughness height VREF=1.5;REFHEIGHT=10.0;ROUGHH=0.022 ** wind incidence angle IN_ANG=30.0*PI/180.

VELZ=VREF*COS(IN_ANG) VELZ

VELX=VREF*SIN(IN_ANG) VELX

ZRFDRH=REFHEIGHT/ROUGHH

VTAU=VREF*AKAP/LOG(ZRFDRH) VTAU

VTAUX=VELX*AKAP/LOG(ZRFDRH) VTAUX

VTAUZ=VELZ*AKAP/LOG(ZRFDRH) VTAUZ

RHIN=1.189 CHAR(FORM1,FORMX,FORMZ,FORMK,FORME)

FORM1=VTAU/AKAP FORMX=VTAUX/AKAP FORMZ=VTAUZ/AKAP

FORMK=VTAU^2/0.3 FORME=VTAU^3/AKAP

(SOURCE OF P1 AT BLINL IS RHIN*(:FORMZ:*LOGE(YG/:ROUGHH:)) WITH IMA$ T<100) (SOURCE OF U1 AT BLINL IS RHIN*(:FORMZ:*LOGE(YG/:ROUGHH:))*:FORMX:*$ LOGE(YG/:ROUGHH:) WITH IMAT<100) (SOURCE OF W1 AT BLINL IS RHIN*(:FORMZ:*LOGE(YG/:ROUGHH:))*:FORMZ:*$ LOGE(YG/:ROUGHH:) WITH IMAT<100) (SOURCE OF KE AT BLINL IS RHIN*(:FORMZ:*LOGE(YG/:ROUGHH:))*:FORMK: $ WITH IMAT<100) (SOURCE OF EP AT BLINL IS RHIN*(:FORMZ:*LOGE(YG/:ROUGHH:))*:FORME:/$ YG WITH IMAT<100)

(SOURCE OF P1 AT BLINW IS RHIN*(:FORMX:*LOGE(YG/:ROUGHH:)) WITH IMA$ T<100) (SOURCE OF U1 AT BLINW IS RHIN*(:FORMX:*LOGE(YG/:ROUGHH:))*:FORMX:*$ LOGE(YG/:ROUGHH:) WITH IMAT<100) (SOURCE OF W1 AT BLINW IS RHIN*(:FORMX:*LOGE(YG/:ROUGHH:))*:FORMZ:*$ LOGE(YG/:ROUGHH:) WITH IMAT<100) (SOURCE OF KE AT BLINW IS RHIN*(:FORMX:*LOGE(YG/:ROUGHH:))*:FORMK: $ WITH IMAT<100) (SOURCE OF EP AT BLINW IS RHIN*(:FORMX:*LOGE(YG/:ROUGHH:))*:FORME:/$ YG WITH IMAT<100)

inform13end

Bernardo Santos Aflalo April 13, 2006 17:57

Re: Inlet Profile (Please, I really need some help
 
Thanks for the answer, Mike! It helps me a lot...but I still have some questions:

a) Why I have to define this pressure source if my inlet have a well defined velocity profile?

b) In my case, which is indeed much simpler, I have to do a pressure source of uin * density too?

c) Why the velocity source is density * uin^2? The source in my simulation is just the formula for the uin...is this incorrect?

Thanks again!

Aflalo

Mike April 18, 2006 07:43

Re: Inlet Profile (Please, I really need some help
 
In PHOENICS, the P1 variable in the COVAL function denotes the continuity equation; and U1, V1, and W1 are the variables for the momentum equation.

It is necessary to specify the boundary condition for the continuity equation,

ie mass inflow rate = density*velocity*area

which is in kg/s.

It is also necessary to specify the corresponding momentum source, which is

mass inflow rate*velocity

and has units of Newtons.

If you specify the source just as velocity*area, then the units are incorrect, ie m^3/s.


Bernardo Santos Aflalo April 18, 2006 12:38

Re: Inlet Profile (Please, I really need some help
 
Now I got it! Thank you so much , Mike!

PattiMichelle July 1, 2006 14:37

Re: Inlet Profile (Please, I really need some help
 
Thank you for the code snippets, Mike, they were fun to practice reading.

Patti


All times are GMT -4. The time now is 07:08.