Hello, I am new to Code_Saturne, I am using Code_Saturne v5.0.8 and Salome v8.4.0 for pre- and post-processing. I am operating on Ubuntu 16.04.
Yvan, I've been attempting to run the simple electric arc case that you provided earlier in this thread (I also attached it here for convenience). I could not directly run the "pfender_case1.xml" file because of the version difference, but I was able to start a new .xml file and recreate most of the settings. I was able to successfully run the new file on Code_Saturne, but I've been having trouble with the initialization.
Specifically, the files "cs_user_boundary_conditions.f90" and "cs_user_initialization.f90" that were provided with the download file have been giving me trouble. If I manually add them to the SRC directory in the .xml file that I created, I get an error, which I have attached below as "Calculation Error.pdf". I also attached the "compile.log" file from the RESU directory. I assume that something needs to be altered in these files to make them compatible with the new version, but I wouldn't know how to do that.
The way I see it, I have three options:
1. Alter the original "pfender_case.xml" file to function in v5.0.8
2. Alter the files "cs_user_boundary_conditions.f90" and "cs_user_initialization.f90" to function with the new .xml file
3. Use a different case entirely or start from scratch
Which of these options would be the best, and could someone help me figure out how to alter the relevant files? If there is a newer case that works in Code_Saturne v5.0.8, that would also work. I would greatly appreciate any help that can be given.
If this question would be better suited to its own thread, let me know and I can create a new thread for it.
dc electric arc
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Re: dc electric arc
- Attachments
-
- PFENDER_CASE1.tar.gz
- (1.43 MiB) Downloaded 275 times
-
- compile.log
- (7.66 KiB) Downloaded 264 times
-
- Calculation Error.pdf
- (19.74 KiB) Downloaded 242 times
-
- Posts: 4209
- Joined: Mon Feb 20, 2012 3:25 pm
Re: dc electric arc
Hello,
Here is a version 5.0 setup for PFENDER.
Best regards,
Yvan
Here is a version 5.0 setup for PFENDER.
Best regards,
Yvan
- Attachments
-
- PFENDER_CASE1_V5.0.tar.gz
- (1.43 MiB) Downloaded 279 times
Re: dc electric arc
Thank you very much! The new pfender_case1.xml file works. I am currently running a calculation, and I'll see how it goes.
Re: dc electric arc
I ran the case, but the hot column defined in cs_user_initialization (line 136) did not appear; everything started at a uniform value of the reference enthalpy/temperature.
I couldn't directly use the downloaded folder as a study directory, when I tried to I received the error "Study directory: /home/kyle_renfroe/Code_Saturne/prod_studies/19_PFENDER (2), is neither a CFD study nor a CFD study coupling with SYRTHES". I made a new study and moved all of the relevant files over to it, including "cs_user_boundary_conditions.f90" and "cs_user_initialization.f90", which I put directly in the SRC directory. Could this step somehow be causing the problem?
Is there a way that I can modify the original folder to work, or is there something I'm doing wrong with the new folder that I can fix? I attached some relevant files from the RESU directory for reference. One thing to note, "dp_ELE", "cs_user_boundary_conditions.f90", and "cs_user_initialization.f90" all appear in the RESU directory when I run the calculation; is this normal?
The listing file was too large to send, but I can send it separately if it would be helpful.
I couldn't directly use the downloaded folder as a study directory, when I tried to I received the error "Study directory: /home/kyle_renfroe/Code_Saturne/prod_studies/19_PFENDER (2), is neither a CFD study nor a CFD study coupling with SYRTHES". I made a new study and moved all of the relevant files over to it, including "cs_user_boundary_conditions.f90" and "cs_user_initialization.f90", which I put directly in the SRC directory. Could this step somehow be causing the problem?
Is there a way that I can modify the original folder to work, or is there something I'm doing wrong with the new folder that I can fix? I attached some relevant files from the RESU directory for reference. One thing to note, "dp_ELE", "cs_user_boundary_conditions.f90", and "cs_user_initialization.f90" all appear in the RESU directory when I run the calculation; is this normal?
The listing file was too large to send, but I can send it separately if it would be helpful.
- Attachments
-
- cs_user_initialization.f90
- (4.9 KiB) Downloaded 221 times
-
- cs_user_boundary_conditions.f90
- (8.95 KiB) Downloaded 267 times
-
- compile.log
- (5.14 KiB) Downloaded 263 times
Re: dc electric arc
The attachments aren't wanting to go through on the original post, so here are the others.
- Attachments
-
- summary.txt
- (34.22 KiB) Downloaded 263 times
-
- setup.log
- (29.56 KiB) Downloaded 258 times
Re: dc electric arc
Dear Kyle,
Please try the file in C for initialization. You can find my example attached. I have used it for initialization of a hot column in the gas gap and it worked well. Probably you will need to adjust the enthalpy values and spatial coordinates.
The discussion of that case and the case itself is available here:
viewtopic.php?f=2&t=2252
Also please find the archive with the case folder attached. It should work with CS 5.0 on Windows. So you will need to replace the scripts for Windows with the scripts for Linux.
Best regards,
Rodion
Please try the file in C for initialization. You can find my example attached. I have used it for initialization of a hot column in the gas gap and it worked well. Probably you will need to adjust the enthalpy values and spatial coordinates.
The discussion of that case and the case itself is available here:
viewtopic.php?f=2&t=2252
Also please find the archive with the case folder attached. It should work with CS 5.0 on Windows. So you will need to replace the scripts for Windows with the scripts for Linux.
Best regards,
Rodion
- Attachments
-
- Cylindrical test case - Copy.7z
- (1.59 MiB) Downloaded 277 times
-
- cs_user_initialization.c
- (5.75 KiB) Downloaded 275 times
Re: dc electric arc
Hello Rodion,
Thank you for the response. I've tried to run your case, but I get the warning "No boundary definition declared." Do I need to manually define the boundaries, or is there a file somewhere that does it? If I need to do it manually, where can I find the information on what settings to apply to each boundary?
I also tried to recreate my cs_user_initialization.f90 as a C file, but I don't really know what to do for this. Is there any source of information that I could refer to for doing this? Any help you can provide would be appreciated.
Thanks,
Kyle
Thank you for the response. I've tried to run your case, but I get the warning "No boundary definition declared." Do I need to manually define the boundaries, or is there a file somewhere that does it? If I need to do it manually, where can I find the information on what settings to apply to each boundary?
I also tried to recreate my cs_user_initialization.f90 as a C file, but I don't really know what to do for this. Is there any source of information that I could refer to for doing this? Any help you can provide would be appreciated.
Thanks,
Kyle
Re: dc electric arc
Dear Kyle,
Just close this warning, it's okay.
The boundary conditions are defined in the file SRC\cs_user_boundary_conditions.f90
Regarding the initialization, please look into the file cs_user_initialization.c attached above. If you don't understand some certain lines in the code, feel free to ask any questions about it.
Also you can find many different examples of the code in C for Code_Saturne in the folder SRC\EXAMPLES
Best reagrds,
Rodion
Just close this warning, it's okay.
The boundary conditions are defined in the file SRC\cs_user_boundary_conditions.f90
Regarding the initialization, please look into the file cs_user_initialization.c attached above. If you don't understand some certain lines in the code, feel free to ask any questions about it.
Also you can find many different examples of the code in C for Code_Saturne in the folder SRC\EXAMPLES
Best reagrds,
Rodion
Re: dc electric arc
Yvan and/or others,
I've looked in more detail at the subroutines and the results of the case that Yvan provided, and I have more information that I can give. At time zero (I assume that this is the initialized state of the volume before calculations are performed), the entire volume is at a uniform enthalpy value of ~5.1e5, which corresponds to the reference temperature of 1273.15K as listed in the "pfender_case1.xml" file.
(Side note: At time zero, ParaView displays the temperature as 0 degrees (which I assume to be in Kelvin), but at the very next time step the majority of the volume is shown to be at 300K (aside from a hot spot near the cathode), which doesn't make sense based on the entropy value, which has only changed slightly throughout the volume at this point. I find this confusing because the 1273.15K reference temperature defined in the .xml file was correctly converted to an enthalpy value of ~5.1e5, which implies that dp_ELE is being read correctly. Thoughts?)
This value of enthalpy/temperature does not occur in the "cs_user_initialization.f90" or "cs_user_boundary_conditions.f90" files, so I believe that the initialization contained in these files is somehow being overridden.
What can be done to fix this issue? Are there other subroutines I need to add to the SRC folder, such as "cs_user_parameters.f90" or "cs_user_physical_properties.f90"? Any guidance would be appreciated.
Thanks,
Kyle
I've looked in more detail at the subroutines and the results of the case that Yvan provided, and I have more information that I can give. At time zero (I assume that this is the initialized state of the volume before calculations are performed), the entire volume is at a uniform enthalpy value of ~5.1e5, which corresponds to the reference temperature of 1273.15K as listed in the "pfender_case1.xml" file.
(Side note: At time zero, ParaView displays the temperature as 0 degrees (which I assume to be in Kelvin), but at the very next time step the majority of the volume is shown to be at 300K (aside from a hot spot near the cathode), which doesn't make sense based on the entropy value, which has only changed slightly throughout the volume at this point. I find this confusing because the 1273.15K reference temperature defined in the .xml file was correctly converted to an enthalpy value of ~5.1e5, which implies that dp_ELE is being read correctly. Thoughts?)
This value of enthalpy/temperature does not occur in the "cs_user_initialization.f90" or "cs_user_boundary_conditions.f90" files, so I believe that the initialization contained in these files is somehow being overridden.
What can be done to fix this issue? Are there other subroutines I need to add to the SRC folder, such as "cs_user_parameters.f90" or "cs_user_physical_properties.f90"? Any guidance would be appreciated.
Thanks,
Kyle
-
- Posts: 4209
- Joined: Mon Feb 20, 2012 3:25 pm
Re: dc electric arc
Hello,
As a general note, the Doxygen documentation (in the "user examples" tab) should provide quite a bit of information for equivalent settings/transition from Fortran to C if this is what you are looking for. It is not perfect though and may be better organized, so feedback is welcome (some improvements are on the master development branch, but many more are possible). The pdf user documentation still has some useful sections also,
The issue you observe at time step 0 is strange, but might be due to the output being done before the initialization (though that should not occur; there might be some specific way of doing things in this module wich should not happen).
Could you post a small case exhibiting the issues you describe ? I could try to take a look at it (I am not an expert in the electric arcs module, but tracing initialization and temperature/enthalpy conversion issues should be ok).
In general, cs_user_boundary_conditions.f90 should not be overwritten (it overrides the GUI-defined values), but there might be some strange electric-arcs-specific behavior that I could probably understand better tracing it with a debugger.
Regards,
Yvan
As a general note, the Doxygen documentation (in the "user examples" tab) should provide quite a bit of information for equivalent settings/transition from Fortran to C if this is what you are looking for. It is not perfect though and may be better organized, so feedback is welcome (some improvements are on the master development branch, but many more are possible). The pdf user documentation still has some useful sections also,
The issue you observe at time step 0 is strange, but might be due to the output being done before the initialization (though that should not occur; there might be some specific way of doing things in this module wich should not happen).
Could you post a small case exhibiting the issues you describe ? I could try to take a look at it (I am not an expert in the electric arcs module, but tracing initialization and temperature/enthalpy conversion issues should be ok).
In general, cs_user_boundary_conditions.f90 should not be overwritten (it overrides the GUI-defined values), but there might be some strange electric-arcs-specific behavior that I could probably understand better tracing it with a debugger.
Regards,
Yvan