PROBLEM IN THE BOUNDARY CONDITIONS USING COMPRESSABLE MODEL

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Christopher
Posts: 36
Joined: Wed Feb 17, 2021 2:22 pm

PROBLEM IN THE BOUNDARY CONDITIONS USING COMPRESSABLE MODEL

Post by Christopher »

Hello code_saturne experts ;),

my name is Christopher and I am new to this forum. Four weeks ago, I started using code_saturne for CFD Simulations in order to analyze air flows within melt-blown nozzles. So far I used a incompressible model which works fine. However, we are facing velocities of Ma > 0.3. Therefore, I tried to switch to a compressible model but the simulation always ends with the error message.

@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ @@ WARNING: PROBLEM IN THE BOUNDARY CONDITIONS
@ ========
@ ABORT IN THE SUBROUTINE STDTCL
@
@ The flow is imposed on the zone IZONE = 2
@ since IQIMP(IZONE) = 1
@ But, on this zone, the integrated product RHO D S is zero:
@ its value is = 0.00000E+00
@ (D is the direction along which is imposed the flow).
@
@ The calculation will not run.
@
@ Verify the data in the interface and particularly
@ - that the vector RCODCL(IFAC,IU,1),
@ RCODCL(IFAC,IV,1),
@ RCODCL(IFAC,IW,1) which gives
@ the velocity direction is non null and not uniformly
@ perpendicular to the inlet faces
@ - that the inlet surface is not zero (or that the number
@ of boundary faces within the zone is not zero)
@ - that the density is not zero
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@

@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ @@ WARNING: PROBLEM IN THE BOUNDARY CONDITIONS
@ ========
@ ABORT IN THE SUBROUTINE STDTCL
@
@ The flow is imposed on the zone IZONE = 1
@ since IQIMP(IZONE) = 1
@ But, on this zone, the integrated product RHO D S is zero:
@ its value is = 0.00000E+00
@ (D is the direction along which is imposed the flow).
@
@ The calculation will not run.
@
@ Verify the data in the interface and particularly
@ - that the vector RCODCL(IFAC,IU,1),
@ RCODCL(IFAC,IV,1),
@ RCODCL(IFAC,IW,1) which gives
@ the velocity direction is non null and not uniformly
@ perpendicular to the inlet faces
@ - that the inlet surface is not zero (or that the number
@ of boundary faces within the zone is not zero)
@ - that the density is not zero
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@

Did anyone got the same or a similar problem? What am I doing wrong?

Thank you in advance.

Kind regards, Christopher
Attachments
Mesh_Exxon_2D_mit_Freistrahl.med
(8.07 MiB) Downloaded 140 times
setup.xml
(9.87 KiB) Downloaded 151 times
Yvan Fournier
Posts: 4069
Joined: Mon Feb 20, 2012 3:25 pm

Re: PROBLEM IN THE BOUNDARY CONDITIONS USING COMPRESSABLE MODEL

Post by Yvan Fournier »

Hello,

Checking your case under v6.0, I reproduce the issue. I guess we may have a bug with the boundary density not being updated early enough at some faces, but am checking.

Best regards,

Yvan
Yvan Fournier
Posts: 4069
Joined: Mon Feb 20, 2012 3:25 pm

Re: PROBLEM IN THE BOUNDARY CONDITIONS USING COMPRESSABLE MODEL

Post by Yvan Fournier »

Hello,

I fixed the main issue in the master, v7.0, and v6.0 branches (available immediately on GitHub, will be in the next v7 beta and v6.0.7 releases). It was due to the GUI not initializing some values correctly, so completing the setup with user subroutines could be a temporary solution.

There is still another issue, in which after 2 time steps, the density becomes negative in about 1000 cells, meaning the pressure/temperature values are probably not in a reasonable range, which can probably be solved by better adapted settings (I'll let you see for that part).

Best regards,

Yvan
Christopher
Posts: 36
Joined: Wed Feb 17, 2021 2:22 pm

Re: PROBLEM IN THE BOUNDARY CONDITIONS USING COMPRESSABLE MODEL

Post by Christopher »

Hi Yvan,

thank for your Information. For me, it is a little difficult as a novice to understand all the correlations for numerical cfd simulation. If I now set a velocity (norm) at the inlet instead of the mass flow, I get a different error message???

@
@ UNINITIALIZED BOUNDARY CONDITIONS
@ Number of boundary faces 702; variable Wall distance
@ icodcl variable last face 56578
@
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ @@ WARNING: ABORT DURING THE BOUNDARY CONDITIONS CHECK
@ ========
@
@ Uninitialized boundary conditions : 702
@ Unexpected boundary conditions:
@ on the scalars : 0
@ on the scalars representing
@ a variance : 0
@ Incoherencies:
@ between velocity and scalars : 0
@
@ The calculation will not be run.
@
@ Verify the parameters given via the interface or
@ cs_user_boundary_conditions.
@

First face with boundary condition definition error
(out of 702)
has boundary condition type 9, center (0.0560466, -0.0712998, 0.0005)

/home/A41771/salome/V8_5_0/modules/src/PRECFDSTUDY/src/base/cs_boundary_conditions.c:363: Fatal error.

Some boundary condition definitions are incomplete or incorrect.
-----------------------------------

But that's also in line with your assessment.

By the way, I have a general question. In earlier versions of code_saturne there was a menu for choosing steady or unsteady flow. So if I want to simulate a steady flow I should choose "Steady" or "Space & time varying" and if unsteady I should choose "Constant" or "Time varying"? Surely it depends on whether I want to use a fixed time step or a variable.

Best regards,
Christopher
Yvan Fournier
Posts: 4069
Joined: Mon Feb 20, 2012 3:25 pm

Re: PROBLEM IN THE BOUNDARY CONDITIONS USING COMPRESSABLE MODEL

Post by Yvan Fournier »

Hello,

Did you update the code with Git branch containing my fix, or just try another variant with the same version ? I believe the bug I fixed can impact all boundary condition combinations (where you choose 2 of 4 combinations).

If you are not familiar with Git, I can send you a separate patch, for a v6.0 version. Or, as mentioned before, it is possible to avoid this bug by adding a user subroutine, for which I can help you.

Best regards,

Yvan
Christopher
Posts: 36
Joined: Wed Feb 17, 2021 2:22 pm

Re: PROBLEM IN THE BOUNDARY CONDITIONS USING COMPRESSABLE MODEL

Post by Christopher »

Hello Yvan,

I just try another variant with the same version :? . When I add in the menu where I choose 2 of 4 boundary condition combinations for instance pressure and temperature the icon turns green. However, if I then switch to another menu the icon is red again and had lost its value. I believe this is the bug you are talking about.

Unfortunately I am not familiar with Git. Since I use code_saturne 5.3, do you think a patch for v.6.0 will also work? I use code_saturne on CAE Linux. Maybe I need to update code_saturne to v7.0 there. When adding a user subroutine or installing a patch I would appreciate your help.

Thank you very much.

Best regards,
Christopher
Yvan Fournier
Posts: 4069
Joined: Mon Feb 20, 2012 3:25 pm

Re: PROBLEM IN THE BOUNDARY CONDITIONS USING COMPRESSABLE MODEL

Post by Yvan Fournier »

Hello,

You can simply drop the attached file in your case's SRC directory.

You will need to remove this file if you later upgrade to a more recent code_saturne version, but it will allow you at least to do a bit more testing with your current version.

Version 7.0 should be released in May, so upgrading at that time would be a good idea.

Best regards,

Yvan
Attachments
cs_gui_boundary_conditions.c
(112.93 KiB) Downloaded 133 times
Christopher
Posts: 36
Joined: Wed Feb 17, 2021 2:22 pm

Re: PROBLEM IN THE BOUNDARY CONDITIONS USING COMPRESSABLE MODEL

Post by Christopher »

Hello Yvan,

thank you for providing the boundary conditions update. I have droped the file into my case's SRC directory and tried to run the simulation. Within the solver window, I get the message " Compiling user subroutines and linking" before " Preparing calculation data". So it seems to work. However, I still get an error in the " Starting calculation" phase.

--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
solver script exited with status 1.

Error running the calculation.

Check Code_Saturne log (listing) and error* files for details.


In the listing file the message is:

@
@ UNINITIALIZED BOUNDARY CONDITIONS
@ Number of boundary faces 702; variable Wall distance
@ icodcl variable last face 56578
@
@
@
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ @@ WARNING: ABORT DURING THE BOUNDARY CONDITIONS CHECK
@ ========
@
@ Uninitialized boundary conditions : 702
@ Unexpected boundary conditions:
@ on the scalars : 0
@ on the scalars representing
@ a variance : 0
@ Incoherencies:
@ between velocity and scalars : 0
@
@ The calculation will not be run.
@
@ Verify the parameters given via the interface or
@ cs_user_boundary_conditions.
@

Do I have to do anything else, than just drop it into my case's SRC directory?

Best regards,
Christopher
Yvan Fournier
Posts: 4069
Joined: Mon Feb 20, 2012 3:25 pm

Re: PROBLEM IN THE BOUNDARY CONDITIONS USING COMPRESSABLE MODEL

Post by Yvan Fournier »

Hello,

In theory, dropping the file in SRC should be enough. I'll provide you soon (later today or tomorrow) with a "print" /tracing statement added so we can check if it is called at all (there are some issues where it is ignored on some systems such a Ubuntu with pre-build code_saturne packages).

Best regards,

Yvan
Christopher
Posts: 36
Joined: Wed Feb 17, 2021 2:22 pm

Re: PROBLEM IN THE BOUNDARY CONDITIONS USING COMPRESSABLE MODEL

Post by Christopher »

Hi Yvan,

I did not manage to run the simulation. It would indeed be helpful to check if your script is called, although it is displayed in the solver window.

Kind regards,
Christopher
Post Reply