deepflame-dev
deepflame-dev copied to clipboard
Testing Error from the twoD_detonationH2 case with DNN
Thanks to the DeepFlame team for answering my previous questions, please forgive me for asking another question.
I downloaded the DNN models and copied the HE04_Hydrogen_ESH2_GMS_sub_20221101 into /mechanisms
.
Then I run the following code:
cd deepflame-dev/examples/dfHighSpeedFoam/twoD_detonationH2
./Allrun
The process will be terminated. the log.mpirun
show:
whatever I keep the default settings
or modify the torchModel
This error always happens, and is similar to Issused#175.
However, I have downloaded the DNN, and there is no "inference.py" file in twoD_detonationH2.
Looking forward to your solutions! Thanks a lot!
Hi there! Thank you for reaching out and providing the details. To run DeepFlame with DNN, please follow these steps:
-
Ensure you have an
inference.py
file and a/mechanisms
directory in your case directory. Theinference.py
file is essential as it reads in the DNN models. You can copy this file from thepytorchIntegrator
examples available in/examples/df0Foam
. No modifications to the file are needed. -
For the
/mechanisms
file, it's recommended to create a soft link that points to$DF_ROOT/mechanisms
instead of copying the entire directory. You can achieve this by running the following command:ln -nsf /your/path/to/mechanisms/file mechanisms
. -
Download the required DNN models into the
$DF_ROOT/mechanisms
directory. Make sure you have modified theTorchSettings
in/constant/CanteraTorchProperties
of your case directory correctly, as you mentioned.
Regarding your specific case, please note that the mechanism file named H2_Ja.yaml
contains more species than the DNN model HE04_Hydrogen_ESH2_GMS_sub_20221101
. To resolve this, try replacing H2_Ja.yaml
with ES80_H2-7-16.yaml
which can be found in $DF_ROOT/mechanisms/H2
. After making this change, you should be able to run the twoD_detonationH2
case successfully.
Feel free to reach out if you have any further questions or need additional assistance. We're here to help!
Hi there! Thank you for reaching out and providing the details. To run DeepFlame with DNN, please follow these steps:
- Ensure you have an
inference.py
file and a/mechanisms
directory in your case directory. Theinference.py
file is essential as it reads in the DNN models. You can copy this file from thepytorchIntegrator
examples available in/examples/df0Foam
. No modifications to the file are needed.- For the
/mechanisms
file, it's recommended to create a soft link that points to$DF_ROOT/mechanisms
instead of copying the entire directory. You can achieve this by running the following command:ln -nsf /your/path/to/mechanisms/file mechanisms
.- Download the required DNN models into the
$DF_ROOT/mechanisms
directory. Make sure you have modified theTorchSettings
in/constant/CanteraTorchProperties
of your case directory correctly, as you mentioned.Regarding your specific case, please note that the mechanism file named
H2_Ja.yaml
contains more species than the DNN modelHE04_Hydrogen_ESH2_GMS_sub_20221101
. To resolve this, try replacingH2_Ja.yaml
withES80_H2-7-16.yaml
which can be found in$DF_ROOT/mechanisms/H2
. After making this change, you should be able to run thetwoD_detonationH2
case successfully.Feel free to reach out if you have any further questions or need additional assistance. We're here to help!
Thank you very much for your careful guidance! I followed the above steps and ran the twoD_detonationH2
with DNN successfully! I appreciate you spending the time to help me to solve this problem.
However, I meet a new error😭. The initial phase of calculation is fine, but about Time = 7e-7
, the process will be terminated. The log.mpirun
as below:
I used the ES80_H2-7-16.yaml
as the mechanism file. the CanteraTorchProperties
as below:
I have not found a solution to this problem on the web. Looking forward to your help, thanks again!
However, I meet a new error😭. The initial phase of calculation is fine, but about
Time = 7e-7
, the process will be terminated. Thelog.mpirun
as below:
This error message usually means that the computation has diverged, and there can be multiple reasons causing this issue.
Thank you for the reply. I will check the settings of each file and hope to solve this problem. Thanks again.🤗
Hi there! Thank you for reaching out and providing the details. To run DeepFlame with DNN, please follow these steps:
- Ensure you have an
inference.py
file and a/mechanisms
directory in your case directory. Theinference.py
file is essential as it reads in the DNN models. You can copy this file from thepytorchIntegrator
examples available in/examples/df0Foam
. No modifications to the file are needed.- For the
/mechanisms
file, it's recommended to create a soft link that points to$DF_ROOT/mechanisms
instead of copying the entire directory. You can achieve this by running the following command:ln -nsf /your/path/to/mechanisms/file mechanisms
.- Download the required DNN models into the
$DF_ROOT/mechanisms
directory. Make sure you have modified theTorchSettings
in/constant/CanteraTorchProperties
of your case directory correctly, as you mentioned.Regarding your specific case, please note that the mechanism file named
H2_Ja.yaml
contains more species than the DNN modelHE04_Hydrogen_ESH2_GMS_sub_20221101
. To resolve this, try replacingH2_Ja.yaml
withES80_H2-7-16.yaml
which can be found in$DF_ROOT/mechanisms/H2
. After making this change, you should be able to run thetwoD_detonationH2
case successfully. Feel free to reach out if you have any further questions or need additional assistance. We're here to help!Thank you very much for your careful guidance! I followed the above steps and ran the
twoD_detonationH2
with DNN successfully! I appreciate you spending the time to help me to solve this problem.However, I meet a new error😭. The initial phase of calculation is fine, but about
Time = 7e-7
, the process will be terminated. Thelog.mpirun
as below:
I used the
ES80_H2-7-16.yaml
as the mechanism file. theCanteraTorchProperties
as below:
I have not found a solution to this problem on the web. Looking forward to your help, thanks again!
Hello, have you solved this issue? I have the same problem when using DNN models to solve the example case. Exactly, the failure occur almost the same time at '7.27e-7 s' and due to the same reason 'cantera calculation diverged'. This failure did not occurr when I just Allrun this example without DNN.
Hi there! Thank you for reaching out and providing the details. To run DeepFlame with DNN, please follow these steps:
- Ensure you have an
inference.py
file and a/mechanisms
directory in your case directory. Theinference.py
file is essential as it reads in the DNN models. You can copy this file from thepytorchIntegrator
examples available in/examples/df0Foam
. No modifications to the file are needed.- For the
/mechanisms
file, it's recommended to create a soft link that points to$DF_ROOT/mechanisms
instead of copying the entire directory. You can achieve this by running the following command:ln -nsf /your/path/to/mechanisms/file mechanisms
.- Download the required DNN models into the
$DF_ROOT/mechanisms
directory. Make sure you have modified theTorchSettings
in/constant/CanteraTorchProperties
of your case directory correctly, as you mentioned.Regarding your specific case, please note that the mechanism file named
H2_Ja.yaml
contains more species than the DNN modelHE04_Hydrogen_ESH2_GMS_sub_20221101
. To resolve this, try replacingH2_Ja.yaml
withES80_H2-7-16.yaml
which can be found in$DF_ROOT/mechanisms/H2
. After making this change, you should be able to run thetwoD_detonationH2
case successfully. Feel free to reach out if you have any further questions or need additional assistance. We're here to help!Thank you very much for your careful guidance! I followed the above steps and ran the
twoD_detonationH2
with DNN successfully! I appreciate you spending the time to help me to solve this problem. However, I meet a new error😭. The initial phase of calculation is fine, but aboutTime = 7e-7
, the process will be terminated. Thelog.mpirun
as below:  I used the
ES80_H2-7-16.yamlas the mechanism file. the
CanteraTorchProperties` as below:I have not found a solution to this problem on the web. Looking forward to your help, thanks again!
Hello, have you solved this issue? I have the same problem when using DNN models to solve the example case. Exactly, the failure occur almost the same time at '7.27e-7 s' and due to the same reason 'cantera calculation diverged'. This failure did not occurr when I just Allrun this example without DNN.
Sorry, I haven't found a solution to the problem.
Sorry for the late response. DNN is curently not available for dfHighSpeedFoam, so variables are not be solved (You can see in the log.mpi that iterations are 0). That's why cantera throw error when calculating chemistry. You can only use cvode when using this solver.