Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I apply boundary conditions? #47

Open
sidkamat opened this issue May 4, 2023 · 8 comments
Open

How do I apply boundary conditions? #47

sidkamat opened this issue May 4, 2023 · 8 comments

Comments

@sidkamat
Copy link

sidkamat commented May 4, 2023

Hi. I was wondering how do I apply boundary conditions. I know BCs have to be assigned at the time of grid creation but let's say I want a velocity-inlet of 10 m/s, how do I do that? I can apply the velocity-inlet BC during the grid generation process, but how do input the 10 m/s. Is it just the u-vel in the UCNS3D.DAT file? If yes, what do I do when I have two inlet conditions?

@TakisCFD
Copy link
Collaborator

TakisCFD commented May 4, 2023

You need to introduce your inflow conditions in the code if more than one inflow is required. You can have a look at the flow operations module and the inflow subroutines

@sidkamat
Copy link
Author

sidkamat commented May 4, 2023

What if I have a single inflow? I tried specifying the inflow velocity using in the u-vel in UCNS3D.DAT but that seems to apply to the entire grid and not just the inflow boundary

@TakisCFD
Copy link
Collaborator

TakisCFD commented May 4, 2023

This is correct since the initialization depends on the initial condition profile flag. I will suggest that you go through the read me file and parameters file instructions since this will save you time figuring out what you need to change

@SRkumar97
Copy link

Hello!
I am requiring some help with setting up a turbulent boundary layer profile at the inlet of a 3D cuboidal domain (flat plate boundary layer). My doubt is, the profile.F90 comprises several flow profiles e.g. 95 is set for the TGV case. But all of these profiles seem to be applicable to the entire inlet domain. I wish to prescribe the basic primitive variables (rho, U, V, W, P) as a function of the domain length. i.e. if x=0 is the inlet domain, I wish to specify all these 5 variables distinctly for every cell across the domain, from y=0 to y=ymax. This is in the interest of prescribing a turbulent boundary layer profile at the inlet. Prescribing the entire profile in the profile.F90 looks a bit tedious, as the number of such data lines will be very bulky for fine meshes. Ideally, I want the code to read an entire inlet.dat ASCII file and interpolate the values into the corresponding grid cells, only in the inlet/inflow domain. Need some guidance on this, thanks for reading!

@sidkamat
Copy link
Author

sidkamat commented Jul 5, 2023

@SRkumar97 I think you can apply a velocity profile using the log law or the 1/7th power law.

@TakisCFD
Copy link
Collaborator

TakisCFD commented Jul 5, 2023

For the inlet turbulent boundary profile creation, you will need to modify the function inflow. The function inflow has already the x,y,z coordinates available for you to use and define the profiles that you want.
This should suffice to ensure the correct boundary layer profile is inserted.

@SRkumar97
Copy link

Thanks a lot, I'll look into the inflow function for defining the profile!

@SRkumar97
Copy link

Hello!
I thoroughly went through the flow_operations.f90 which has got the function inflow, with profiles defined for several problems. I see the the POX() arrays correspond to position co-ordinates for X direction while POY() and POZ() arrays correspond to Y and Z-directions. And each of these arrays is of size 3. The point that is unclear is, what do each of POX(1), POX(2) and POX(3) correspond to in the actual mesh? Do each of these 3 cover a set of X-co-ordinates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants