Please, find Fortran files which I have changed.
In addition in file cs_user_parameters.f90 I have added the following line:
iturb = 0
cs_user_parameters.f90 works, but in output I can see values of Enthalpy lower than the clipping value specified in file cs_user_parameters.f90.
I have checked file cs_user_physical_properties.f90 and found that it doesn't work on Windows 7 too along with cs_user_initialization.f90. (the same as on Ubuntu)
Best regards,
Rodion
Error of using standard modules during compilation
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Re: Error of using standard modules during compilation
- Attachments
-
- cs_user_source_terms.f90
- (40.03 KiB) Downloaded 338 times
-
- cs_user_boundary_conditions.f90
- (44.15 KiB) Downloaded 323 times
-
- cs_user_physical_properties.f90
- (16.83 KiB) Downloaded 362 times
-
- Posts: 4251
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Error of using standard modules during compilation
Hello,
How did you update your files ? uselph does not exist anymore in version 5.0, so it is never called.
You should use cs_user_physical_properties.c instead.
Regards,
Yvan
How did you update your files ? uselph does not exist anymore in version 5.0, so it is never called.
You should use cs_user_physical_properties.c instead.
Regards,
Yvan
Re: Error of using standard modules during compilation
Oh, sorry, I forgot to change the subroutine name. I found file called cs_user_physical_properties.f90 in folder REFERENCE, it contains subroutine usphyv. I took my code from uselph, put it into usphyv and it looks okay now. At least density, thermal conductivity and specific heat in output are correct on both Windows 7 and Ubuntu.
Thank you for this remark.
Please, find my current files by the following link:
https://drive.google.com/open?id=0BzeG5 ... 1Z5YnRKTTQ
What can you recommend regarding cs_user_initialization.f90 and problems with clipping?
Is there any way to use initialization in Fortran? Only it exists only in C now?
Best regards,
Rodion
Thank you for this remark.
Please, find my current files by the following link:
https://drive.google.com/open?id=0BzeG5 ... 1Z5YnRKTTQ
What can you recommend regarding cs_user_initialization.f90 and problems with clipping?
Is there any way to use initialization in Fortran? Only it exists only in C now?
Best regards,
Rodion
-
- Posts: 4251
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Error of using standard modules during compilation
Hello,
I can only check your files later. What issue do you still have ?
And yes there is still also a Fortran initialization function (though it will be removed in the future).
Best regards,
Yvan
I can only check your files later. What issue do you still have ?
And yes there is still also a Fortran initialization function (though it will be removed in the future).
Best regards,
Yvan
Re: Error of using standard modules during compilation
Thank you for your answer, Yvan.
I still have cells with negative Enthalpy despite clipping in cs_user_parameters.f90. And I still have inactive initialization in Fortran. It works only in C.
Best regards,
Rodion
I still have cells with negative Enthalpy despite clipping in cs_user_parameters.f90. And I still have inactive initialization in Fortran. It works only in C.
Best regards,
Rodion
-
- Posts: 4251
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Error of using standard modules during compilation
Hello,
Not sure about what may cause negative Enthalpy. What type of mesh do you use ? What about the time step ? Does the issue appear early or later on ?
Your setup (user files) is not "trivial", so it is not easy to have a "quick" look, but I have a few questions/suggestions:
- I don't remember why you have your own copy of the gradient (something to do with solid/fluid sections ?)
- A good approach is to add user functions piece by piece, even using simplified definitions for example for the enthalpy/temperature conversion and such, and adding the "complete" definitions/equations progressively. This can help detect at which point the behavior starts being incorrect (rather than simplified), and debug accordingly. Do you have such "intermediate" setups ? How did they behave ?
Best regards,
Yvan
Not sure about what may cause negative Enthalpy. What type of mesh do you use ? What about the time step ? Does the issue appear early or later on ?
Your setup (user files) is not "trivial", so it is not easy to have a "quick" look, but I have a few questions/suggestions:
- I don't remember why you have your own copy of the gradient (something to do with solid/fluid sections ?)
- A good approach is to add user functions piece by piece, even using simplified definitions for example for the enthalpy/temperature conversion and such, and adding the "complete" definitions/equations progressively. This can help detect at which point the behavior starts being incorrect (rather than simplified), and debug accordingly. Do you have such "intermediate" setups ? How did they behave ?
Best regards,
Yvan
Re: Error of using standard modules during compilation
Thank you for your answer, Yvan.
Please find the hexahedral mesh file by the following link:
https://drive.google.com/open?id=0BzeG5 ... UpqclFBSmM
The time step is 10e-7s.
Negative enthalpy usually constitutes a ring around the electric arc and appears occasionally at almost random time and z-coordinate.
I have my own copy of cs_gradient.c because for electric potential gradient calculation I wanted to take into account not only cells size, but also electric conductivity. It reduced severe gradient of electric current density between cathode and fluid. Before this edit electric current density was ≈10e+6 in cathode corner cells and ≈–10e+6 in fluid cells at the vicinity of cathode. Now electric current density is much more smooth.
I tried to implement the same idea for enthalpy and thermal conductivity, but it didn't give any visible feedback.
Regarding, intermediate setups, I found the problem with negative enthalpy only after solid parts involving. It looks like it is caused by severe gradients between cathode and fluid. But I'll check it again.
UPD: I have tried to remove correction of enthalpy gradient and the problem has gone. Now enthalpy is slightly lower than the clipping limit at some time steps, but it is not a big problem.
Thank you a lot for drawing my attention to it.
Best regards,
Rodion
Please find the hexahedral mesh file by the following link:
https://drive.google.com/open?id=0BzeG5 ... UpqclFBSmM
The time step is 10e-7s.
Negative enthalpy usually constitutes a ring around the electric arc and appears occasionally at almost random time and z-coordinate.
I have my own copy of cs_gradient.c because for electric potential gradient calculation I wanted to take into account not only cells size, but also electric conductivity. It reduced severe gradient of electric current density between cathode and fluid. Before this edit electric current density was ≈10e+6 in cathode corner cells and ≈–10e+6 in fluid cells at the vicinity of cathode. Now electric current density is much more smooth.
I tried to implement the same idea for enthalpy and thermal conductivity, but it didn't give any visible feedback.
Regarding, intermediate setups, I found the problem with negative enthalpy only after solid parts involving. It looks like it is caused by severe gradients between cathode and fluid. But I'll check it again.
UPD: I have tried to remove correction of enthalpy gradient and the problem has gone. Now enthalpy is slightly lower than the clipping limit at some time steps, but it is not a big problem.
Thank you a lot for drawing my attention to it.
Best regards,
Rodion