CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   1/7th power law inlet profile (https://www.cfd-online.com/Forums/openfoam-solving/212720-1-7th-power-law-inlet-profile.html)

maddy11 December 7, 2018 04:09

1/7th power law inlet profile
 
Hi all,


I'm doing simulation of a supersonic cavity using k-omega SST model. Could someone please tell me how to set inlet as powerlawInletVelocity ? Please help!



Regards,
Maddy

ssa_cfd December 7, 2018 08:08

you can generate a csv file with inlet height with corresponding inlet velocity and then use fixedprofile boundary condition

maddy11 December 7, 2018 08:59

Dear ssa,

Thanks for your kind reply. I have a few doubts. Basic doubts. I have generated mesh in Gambit.
Is it possible to get inlet patch elements and their cellcentres in Paraview? How to use the fixed profile BC? Im an OpenFoam beginner. Kindly elaborate please.

Regards,
Maddy

pvita December 7, 2018 09:37

Have a look at groovyBC boundary condition. You can place it at your inlet patch and with help of functions pos() and pts() that provide vector fields with face-centers and vertices respectively construct your profile.

maddy11 December 7, 2018 10:27

Dear pvita,
I tried installation of swak4foam and got some installation errors. Thats why Im looking at other alternatives. Kindly help please.

Regards,
Maddy

ssa_cfd December 7, 2018 11:54

https://www.youtube.com/watch?v=rfNYVqU1py4

maddy11 December 8, 2018 05:38

Absolutely helpful!!! Thanks a ton!!! :):)

maddy11 December 8, 2018 10:25

Dear ssa,
I have just one more doubt. Hope you can help. Should I apply the velocity values to the cell centres ? If so, how do I get the cell centre coordinates in ParaView? Is it simply the cell data?

Regardss,
Maddy

ssa_cfd December 8, 2018 14:11

not cell centres.. u give values based on the height. and openfoam interpolates it automatically.

pvita December 10, 2018 03:24

@maddy11: Read carefully installation instructions of swak4Foam and its error messages. Make sure you have all prerequisites installed and swak4Foam is properly configured. swak4Foam is too beautiful to miss it out.

Example of the velocity inlet with the 1/7th profile and maximal velocity of 10 m.s-1 assuming that y=0 goes through the middle of the inlet patch:
Code:

inlet
{
    type        groovyBC;
    variables  "u_max=10;n=7;r=mag(pos().y);R=mag(max(pts().y));";
    valueExpression "vector(u_max*pow(1-(r/R),1./n),0,0)";
}



All times are GMT -4. The time now is 22:03.