CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CONVERGE (https://www.cfd-online.com/Forums/converge/)
-   -   SCR and UREA injection modelling - Bad Termination Error (https://www.cfd-online.com/Forums/converge/254409-scr-urea-injection-modelling-bad-termination-error.html)

Motaz February 8, 2024 11:48

SCR and UREA injection modelling - Bad Termination Error
 
1 Attachment(s)
I'm working on SCR and UREA injection strategy modelling. I've built an aftertreatment model that includes a mixer part with UREA injection followed by an SCR. The model is based on an actual aftertreatment system for heavy-duty diesel engines. I followed the relevant examples and made some modifications to accommodate the new model.

However, as soon as I start the simulation, an error pops up right away while reading the.in files, and It directly terminates the process. The error description is as follows: "terminate called after throwing an instance of chem_api::inputs_error'
what():Error reading min, common, and max temperature".

See the attached text for your reference.

I'm running the simulations on a server with 64 cores, using Lunix.

Here are some details about my model:

I'm using a steady-state solver.
The surface reaction mechanism is activated for Z and ZNH3.
The PISO solver scheme is used (a density-based solver).
The O'Rourke model is used for turbulent dispersion.
No collision model is applied.
SAGE combustion model for HNCO species.
RNG k-eps for the turbulence model (RANS).
Molten solid model for UREA.
AMR is applied. (I turned off AMR to see if the case will run but it didn't work.)

I consider myself new to Converge, so I might be missing something here.

What are your thoughts on this one?

Thank you

ksrivast February 8, 2024 18:11

Hello Motaz,

The solver is having difficulty parsing min, common and max temperature from therm.dat. Please check values are listed for all species in therm.dat and that they are in the proper format/syntax of the NASA 7 format.

Sincerely,

Motaz February 9, 2024 10:46

1 Attachment(s)
Hello Ksrivast,

Thank you for the assistance.

However, I verified the therm.dat file carefully, and it looks like nothing is wrong with it. I used a therm.dat file from another example. So, there shouldn't be an issue with that. I even uploaded the therm.dat file to another example to test it and the simulation runs without errors.

Attached is the therm.dat file for your reference.

Is there another source of error that could cause the same problem?

I even tried to use all the gas simulation models, but nothing changed. I still get the same error.

Thank you

ksrivast February 9, 2024 17:24

Hello Motaz,

If your simulation includes SCR surface chemistry modeling, you'll also have to check entries in surface_therm.dat. We have seen such messages arise due to improper format or special symbols in the file.

What version of CONVERGE are you using? The therm.dat file points to v3.0.10 being used. If so, this is a very old version of CONVERGE. Could you try one of our recent releases? 3.0.28 or 3.1.11 are our latest releases.


Sincerely,

Motaz February 10, 2024 15:17

Hello Ksrivast,

Thank you for your help.

I fixed the surface_therm.dat and the error does not appear anymore.

However, I received another error related to udf library. The error is "Error while loading udf library: Failed while loading library: libconverge_udf.so: cannot open shared object file: No such file or directory".

I'm using the UDF for the UREA surface reaction in the SCR. I didn't build a UDF from scratch I just modified the UDF.in flag to 1 and the same in the input.in file.

even though I followed the UDF manual step by step, created the build folder and the libconverge_udf.so, and exported the build folder to $LD_LIBRARY_PATH, as per the manual.

What could be the problem here?

Thank you,
Motaz

ksrivast February 12, 2024 13:10

Hello Motaz,

CONVERGE was unable to locate the compiled libconverge_udf.so file. If you're submitting your cases on a cluster, the environment variable LD_LIBRARY_PATH might have been overwritten. You should include the export command in your submission script/procedure.

We would also recommend copy and placing the compiled libconverge_udf.so in your run directory, along with the *.in and *dat files. Try to see if that works.

Sincerely,

Motaz February 12, 2024 13:25

Hello Ksrivast,

I followed your suggestion and it seems like it's reading the UDF. file (I saw that in the script). However, Another error showed up.

It states: terminate called after throwing an instance of 'std::runtime_error'
what(): Could not find specified module element: surface_rxn_2

It seems like it's related to the surface reaction mechanism but I even tried to run an example with the surface reaction model activated and I still get the same error.

Is this related to the UDF issue?

How can I solve this one?

Thank you for your help so far, it's really appreciated.

Best,
Motaz

ksrivast February 12, 2024 13:39

Hello Motaz,

The module surface_rxn_2 is defined within our example UDF surface_reaction_rate.c. Either a) You compiled a libconverge_udf.so file without this UDF in the src/ folder or b) Your LD_LIBRARY_PATH is pointing to the wrong libconverge_udf.so file.

Sincerely,

Motaz February 12, 2024 14:06

Hello Ksrivast,

My mistake was that I compiled the libconverge_udf.so file without this UDF in the src/ folder, as you suggested.

I added the surface_reaction_rate.c to the source folder and it worked.

The simulation is running now without errors.

Thank you so much for your assistance.

Best,
Motaz


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