Boundary condition at inlet

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
quarian_engineer
Posts: 24
Joined: Wed Jul 01, 2015 8:35 am

Boundary condition at inlet

Post by quarian_engineer »

Hello dear users,

I am confused with the definition of boundary condition at inlet; my flow should be in the negative direction of the z-axis, does it mean that I define it as "6 m/s" normal to inlet and as direction - specified coordinates with Z = -1 or is it enough to define just "6 m/s" normal to the inlet?

Kind regards
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Boundary condition at inlet

Post by Yvan Fournier »

Hello,

Positive values of normal flow means incoming flow.

But for simple cases like this, instead of waiting for a an answer on the forum, experimenting with the code on a small/simple mesh is the would have given you a quicker answer (at worst, the code will crash, but it won't bite you).

Regards,

Yvan
quarian_engineer
Posts: 24
Joined: Wed Jul 01, 2015 8:35 am

Re: Boundary condition at inlet

Post by quarian_engineer »

Thank you. Unfortunately, my code crashes anyway. I'd like to know, which BC were in any case right to find the real error a bit faster ;)
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Boundary condition at inlet

Post by Yvan Fournier »

Hello,

OK. If your code crashes anyways, don't forget that there's a section with recommendations on how to debug your case in the documentation section of this web-site:
http://code-saturne.org/cms/documentation/BPG

Hoping it helps (if it doesn't, you can post details providing the info recommended on this forum, but that means iterations between different people, which takes longer).

Regards,

Yvan
quarian_engineer
Posts: 24
Joined: Wed Jul 01, 2015 8:35 am

Re: Boundary condition at inlet

Post by quarian_engineer »

Hello,

Thank you for this link, I didn't know that it exists. Now I have pretty much things to test. ;D

But I'm still confused with my boundary condition. I have one complex case which isn't working and one very simple case which I'm using to test different settings/solvers etc. before run it all on the complex case.

So, I set BC at the inlet in both cases just to 1 m/s with normal direction to the inlet; the simple case gave me only positive values in the velocity distribution as result (as I expected) and in the complex one all values of the velocity were negative. Why is this happening? The both flow domains have the same positions of the inlet, outlet, walls, etc.

Best regards
Selora
Martin FERRAND
Posts: 47
Joined: Wed Mar 14, 2012 10:06 am

Re: Boundary condition at inlet

Post by Martin FERRAND »

Hello,
Could you provide some screenshots to understand your problem?

Best regards
Martin
quarian_engineer
Posts: 24
Joined: Wed Jul 01, 2015 8:35 am

Re: Boundary condition at inlet

Post by quarian_engineer »

Yes, sure.

This is my "complex" flow domain: http://venus.workupload.com/image/Yj5UytDQ it is only the one third of the actual flow domain because of a symmetry. There is a turbine blade in the middle of it.

This is my simple case which is similar to the turbine flow domain: http://venus.workupload.com/image/ORUI3tQj But there is nothing in it, so this is supposed to be a wind channel.

Inlet should be located on the left side, approximately at the coordinate z = 1, and while making pictures I found what I did wrong - accidentally I permuted inlet and outlet in the second case :? . Now all results look similar to each other. Velocity distribution is positive in both cases. (The question is - whether is it correct... Do you think, I should get the negative values because the flow goes in the negative z-direction? To get positive values I set BC at the inlet to -6 m/s)

Even though, the turbine simulation crashes after some iterations (divergence of velocity & pressure). I suppose the last thing that I can change is to test some different settings for the solvers; I don't believe that the simulation crashes because of mesh issues, it looks kind of perfect and I get not a single error after "check mesh".

Thanks anyway :)
Martin FERRAND
Posts: 47
Joined: Wed Mar 14, 2012 10:06 am

Re: Boundary condition at inlet

Post by Martin FERRAND »

Hello,
As a convention, we take negative mass flux for inlets (because as a convention, the normal to the boundary is outwarding) so no matter of the direction of z.
Concerning your crash, what I advice is to extrude your mesh next to the outlet (because the pressure BC is supposing that the mesh is extruded). Otherwise, you could impose a negative inlet at the outlet, that may also work (at that time, be careful to give the same mass flux between in and outlet otherwise the pressure solver will crash in one single iteration)

Best regards
Martin
Post Reply