Recently I am working on a simple thermal radiation problem using the DOM and the FSCK supported by Code Saturne. In general I found that, the FSCK and MODAK model are only available in specific physical models, e.g. combustion and etc. But my project is only concerned on the radiation of a gas mixture with CO2 and H2O.
So, I tried to modify the source functions acquired from GitHub, namely the "cs_rad_transfer_absorption.c", "cs_rad_transfer_solve.c", and "cs_rad_transfer_options.c”. What I have done is to modify the conditional statements which judge the existence of physical model then decide to use FSCK or not.
For example, I modified source code from
Code: Select all
if (pm_flag[CS_COMBUSTION_FUEL] >= 0)
{
......
......
if (rt_params->imfsck == 1)
cs_rad_transfer_fsck(w1, w2, tempk, kgas, agas, agasb);
}
}
Code: Select all
if (1)
{
......
......
if (rt_params->imfsck == 1)
cs_rad_transfer_fsck(w1, w2, tempk, kgas, agas, agasb);
}
}
Code: Select all
/home/jun/Downloads/code_saturne-master/src/fvm/fvm_to_cgns.c:4165: Fatal error.
Data of dimension 7 not handled
Call stack:
1: 0x7f55490caec9 <fvm_to_cgns_export_field+0x129> (libsaturne-7.1.so)
2: 0x7f55490bf60f <fvm_writer_export_field+0xbf> (libsaturne-7.1.so)
3: 0x7f5549190e1c <cs_post_write_var+0x39c> (libsaturne-7.1.so)
4: 0x7f5549196a41 <cs_post_time_step_output+0x1761> (libsaturne-7.1.so)
5: 0x7f5549197401 <cs_post_write_vars+0x11> (libsaturne-7.1.so)
6: 0x7f55490d68b9 <caltri_+0x200e> (libsaturne-7.1.so)
7: 0x7f554a1a585a <main+0x6fa> (libcs_solver-7.1.so)
8: 0x7f55485c4bf7 <__libc_start_main+0xe7> (libc.so.6)
9: 0x555d7ffc766a <_start+0x2a> (cs_solver)
End of stack
Finally, I have a suggestion about the source code in cs_rad_transfer_fsck.c concerned the Gauss-Legendre n-point quadrature.(from line 1048 to 1159) When I chose the 7-point, those code can hardly get the correct quadrature weights for each point, which means wq[3] = 1 and others equal to -nan. Maybe a correction is needed.
Thanks for your patience.