Page 1 of 1
Temperature as a thermal variable for electric arcs
Posted: Tue Jun 27, 2017 1:15 am
by rodion
Hello everyone,
I work on the simulation of electric arc in DC plasma torch. Could you please help me with these details:
1. My goal is to avoid direct establishing of boundary conditions at the electrode surface. So I have to involve electrodes into the simulation domain.
By default Code_Saturne uses enthalpy as a thermal variable, which provides continuity of heat flux in term of enthalpy. But it is not the case if I involve electrodes into the domain. As far as I see, at the interface of metal and fluid the continuous thermal flux should be calculated like:
φ = - λel * dTel/dx = - λfl * dTfl/dx
But Code_Saturne uses enthalpy for this calculation and eventually I have one layer of fluid cells with low temperature (≈1000K) between two hot layers of metal (cathode) and fluid with very high temperature(≈3000K). Because of this problem with cold layer currently I have to impose high electrical conductivity to let electric current go.
Please find pictures with enthalpy and temperature distributions attached.
The question is: how can turn thermal variable from enthalpy to temperature for electric arc simulation or how can I improve the heat flux calculation at the interface of metal and fluid?
2. I need to calculate boundary conditions for vector potential with respect to electric current from all cells of the calculation domain. In case of parallel calculation field_get_val_s gives me access only to those cells which are related to the current thread.
How can I obtain electric current values all over the domain from every thread?
Currently I use output to files for every thread and then read all these files in every thread, but it is slow.
Best regards,
Rodion
Re: Temperature as a thermal variable for electric arcs
Posted: Wed Jun 28, 2017 4:31 pm
by Yvan Fournier
Hello,
1) You can check the b_h_to_t / b_t_to_h (for boundary faces) and c_h_to_t / c_t_to_h (for cells) functions, defined in the sources in src/base. They are defined for several specific models, including electric arcs.
2) How do you use these values ? Do you integrate them, use closest cells, use all values, ... ? Depending on the case, optimization opportunities may vary. You can use the "paragv" (Fortran, in parll module) or cs_parall_allgather_r (C, in cs_parall.h) it you need all values, though this limits the size of cases you run (i.e. not the best option for multi-million cell meshes, OK otherwise).
Regards,
Yvan
Re: Temperature as a thermal variable for electric arcs
Posted: Wed Jun 28, 2017 9:55 pm
by rodion
Thank you for your answer, Yvan!
1. Sorry, I don't really understand how these subroutines with conversion of enthalpy to temperature and vice versa are related to the heat balance between metal and fluid. This interface between metal and fluid is not a boundary, it is located inside the domain.
Could you please give me more detailed description of your idea?
And what do you think about employment of temperature as the main thermal variable for electric arc simulation?
2. I want to integrate electric current through the whole domain as it is described in the formula below. I think paragv is what I need. Thanks a lot, Yvan!
Best regards,
Rodion
Re: Temperature as a thermal variable for electric arcs
Posted: Thu Jun 29, 2017 12:11 am
by Yvan Fournier
Hello,
1) I did not give much thought to the subject, just mentioned the routines which may help you convert enthalpy to temperature and vice versa, not how best to use them.
I'm not sure using temperature as the solved variable would help (conservativity being better expressed with enthalpy), but converting to temperature to compute temperature differences so as to determine boundary conditions or source terms may help. You may need to experiment here.
Regards,
Yvan
Re: Temperature as a thermal variable for electric arcs
Posted: Thu Jun 29, 2017 9:34 pm
by rodion
Thank you, Yvan!
Best regards,
Rodion
Re: Temperature as a thermal variable for electric arcs
Posted: Tue Jul 04, 2017 5:00 pm
by rodion
I have found that it is not so easy to customize CS 4.2 for electric arc simulation with temperature.
Now I think that imposed enthalpy at the faces between cathode cells and fluid cells could help me with the cold cells layer beneath the cathode.
Does someone know, how can I impose enthalpy for certain internal faces to change the enthalpy distribution?
Best regards
Rodion
Re: Temperature as a thermal variable for electric arcs
Posted: Tue Jul 04, 2017 5:55 pm
by Yvan Fournier
Hello,
In any case, I recommend upgrading to version 5.0.
There is no simple way of forcing values at interior faces, but defining a source term based on the difference between the prescribed and current values at cells adjacent to those interior faces is quite easy, and might get you a similar result (at least for a steady state or mean for; for transients you would probably have a "lag").
Regards,
Yvan
Re: Temperature as a thermal variable for electric arcs
Posted: Wed Jul 05, 2017 12:32 am
by rodion
Thank you for your fast answer, Yvan.
I have tried to use CS 5.0 for electric arc simulation, but when I take standard Fortran user files from SRC/EXAMPLES and add my code adapted for 5.0 into it, the compilation gives me following errors:
Code: Select all
C:\Users\user1\Work\Code_Saturne\TransfArc\Case2\RESU\20170705-0124\src_saturne\cs_user_boundary_conditions.f90:84.4:
use paramx
1
Error: 'cs_user_boundary_conditions' of module 'paramx', imported at (1), is also the name of the current program unit
C:\Users\user1\Work\Code_Saturne\TransfArc\Case2\RESU\20170705-0124\src_saturne\cs_user_boundary_conditions.f90:85.4:
use numvar
1
Error: 'cs_user_boundary_conditions' of module 'numvar', imported at (1), is also the name of the current program unit
C:\Users\user1\Work\Code_Saturne\TransfArc\Case2\RESU\20170705-0124\src_saturne\cs_user_boundary_conditions.f90:86.4:
use optcal
1
Error: 'cs_user_boundary_conditions' of module 'optcal', imported at (1), is also the name of the current program unit
C:\Users\user1\Work\Code_Saturne\TransfArc\Case2\RESU\20170705-0124\src_saturne\cs_user_boundary_conditions.f90:87.4:
use cstphy
1
Error: 'cs_user_boundary_conditions' of module 'cstphy', imported at (1), is also the name of the current program unit
C:\Users\user1\Work\Code_Saturne\TransfArc\Case2\RESU\20170705-0124\src_saturne\cs_user_boundary_conditions.f90:89.4:
use entsor
1
Error: 'cs_user_boundary_conditions' of module 'entsor', imported at (1), is also the name of the current program unit
C:\Users\user1\Work\Code_Saturne\TransfArc\Case2\RESU\20170705-0124\src_saturne\cs_user_boundary_conditions.f90:94.4:
use ppthch
1
Error: 'cs_user_boundary_conditions' of module 'ppthch', imported at (1), is also the name of the current program unit
C:\Users\user1\Work\Code_Saturne\TransfArc\Case2\RESU\20170705-0124\src_saturne\cs_user_boundary_conditions.f90:95.4:
use coincl
1
Error: 'cs_user_boundary_conditions' of module 'coincl', imported at (1), is also the name of the current program unit
C:\Users\user1\Work\Code_Saturne\TransfArc\Case2\RESU\20170705-0124\src_saturne\cs_user_boundary_conditions.f90:96.4:
use cpincl
1
Error: 'cs_user_boundary_conditions' of module 'cpincl', imported at (1), is also the name of the current program unit
C:\Users\user1\Work\Code_Saturne\TransfArc\Case2\RESU\20170705-0124\src_saturne\cs_user_boundary_conditions.f90:97.4:
use ppincl
1
Error: 'cs_user_boundary_conditions' of module 'ppincl', imported at (1), is also the name of the current program unit
C:\Users\user1\Work\Code_Saturne\TransfArc\Case2\RESU\20170705-0124\src_saturne\cs_user_boundary_conditions.f90:98.4:
use ppcpfu
1
Error: 'cs_user_boundary_conditions' of module 'ppcpfu', imported at (1), is also the name of the current program unit
C:\Users\user1\Work\Code_Saturne\TransfArc\Case2\RESU\20170705-0124\src_saturne\cs_user_boundary_conditions.f90:99.4:
use atincl
1
Error: 'cs_user_boundary_conditions' of module 'atincl', imported at (1), is also the name of the current program unit
C:\Users\user1\Work\Code_Saturne\TransfArc\Case2\RESU\20170705-0124\src_saturne\cs_user_boundary_conditions.f90:100.4:
use ctincl
1
Error: 'cs_user_boundary_conditions' of module 'ctincl', imported at (1), is also the name of the current program unit
C:\Users\user1\Work\Code_Saturne\TransfArc\Case2\RESU\20170705-0124\src_saturne\cs_user_boundary_conditions.f90:101.4:
use cs_fuel_incl
1
Error: 'cs_user_boundary_conditions' of module 'cs_fuel_incl', imported at (1), is also the name of the current program unit
I had this problem before with CS 4.3. That's why I'm using CS 4.2.
Maybe you know where in the CS code thermal balance is calculated?
I have found another technique in the thesis written by Laurent Chemartin: imposed custom specific heat at the interface faces between metal and fluid. Could you please explain, how can I impose specific heat for certain interior faces?