.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "generated/gallery/configure_beam_simulation.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_generated_gallery_configure_beam_simulation.py: =================================== Configure a Beam Heating Simulation =================================== This example demonstrates a typical configuration of a HYDRAD simulation with electron beam heating. .. GENERATED FROM PYTHON SOURCE LINES 9-17 .. code-block:: Python import astropy.units as u import pathlib import tempfile from pydrad.configure import Configure from pydrad.configure.data import get_defaults from pydrad.configure.util import get_clean_hydrad .. GENERATED FROM PYTHON SOURCE LINES 18-25 HYDRAD can be used for simulations of solar flares, in addition to active region loops. Since flares have significantly stronger energy release, however, some of the parameters need to be set more stringently than might be done for e.g. nanoflare heating. This example will show how to set up a reasonable flare simulation. Let's start with the defaults: .. GENERATED FROM PYTHON SOURCE LINES 25-27 .. code-block:: Python config = get_defaults() .. GENERATED FROM PYTHON SOURCE LINES 28-30 Configure the basic parameters of the simulation first. Let's assume a loop length of 50 Mm, and run the simulation for one hour of simulation time. .. GENERATED FROM PYTHON SOURCE LINES 30-33 .. code-block:: Python config['general']['loop_length'] = 50 * u.Mm config['general']['total_time'] = 1 * u.h .. GENERATED FROM PYTHON SOURCE LINES 34-48 We typically assume that the loop is heated by electron beam heating, where electrons are accelerated to tens of keV in energy in the corona, and stream towards the chromosphere, where they deposit that energy. With beam heating, we typically want to use a slightly more detailed chromosphere (rather than assuming constant temperature). This is for two reasons: (1) it needs to be dense enough to stop the beam, and (2) the energy deposition will produce a more realistic chromospheric evaporation. To do this, we turn on optically thick radiation, which will calculate optically thick radiative losses in the chromosphere, produced by hydrogen, magnesium, and calcium (based on the formulation by Carlsson & Leenaarts 2012). This will also set the chromospheric temperature profile to the so-called VAL C model. .. GENERATED FROM PYTHON SOURCE LINES 48-50 .. code-block:: Python config['radiation']['optically_thick_radiation'] = True .. GENERATED FROM PYTHON SOURCE LINES 51-52 For consistency with VAL C, we also need to set a few boundary conditions: .. GENERATED FROM PYTHON SOURCE LINES 52-58 .. code-block:: Python config['general']['footpoint_height'] = 2.26 * u.Mm config['initial_conditions']['footpoint_temperature'] = 24000 * u.K config['initial_conditions']['footpoint_density'] = 4.2486e9 * u.cm**(-3) config['solver']['minimum_radiation_temperature'] = 24000 * u.K config['solver']['minimum_temperature'] = 4170 * u.K .. GENERATED FROM PYTHON SOURCE LINES 59-66 There is one further option for the chromosphere. It is not generally recommended, but produces more accurate electron densities. This will solve an approximation to radiative transfer for hydrogen with the caveat that it will slow the code by well over an order of magnitude. It is most useful for users who wish to synthesize chromospheric line profiles. Change the value to True if you would like to try using it, and add the minimum_density_limit parameter. .. GENERATED FROM PYTHON SOURCE LINES 66-69 .. code-block:: Python config['radiation']['nlte_chromosphere'] = False config['radiation']['minimum_density_limit'] = 4.2486e9*u.cm**(-3) .. GENERATED FROM PYTHON SOURCE LINES 70-73 This takes care of the chromosphere, but we should also set up the radiation calculation in the corona (the optically thin losses). Let's use the 15 most abundant elements in the Sun for this calculation .. GENERATED FROM PYTHON SOURCE LINES 73-76 .. code-block:: Python config['radiation']['use_power_law_radiative_losses'] = False config['radiation']['elements_equilibrium'] = ['H','He','C','N','O','Ne','Na','Mg','Al','Si','S','Ar','Ca','Fe','Ni'] .. GENERATED FROM PYTHON SOURCE LINES 77-80 We still need to set up the electron beam itself. Let's assume a constant heating for 10 seconds, using a moderate energy flux, typical low energy cut-off of 15 keV, and typical spectral index of 5. .. GENERATED FROM PYTHON SOURCE LINES 80-87 .. code-block:: Python config['heating']['beam'] = [ {'time_start': 10.0*u.s, 'flux': 3e10*u.erg/(u.cm**2)/u.s, 'cut_off': 15.0*u.keV, 'index': 5.0}, ] .. GENERATED FROM PYTHON SOURCE LINES 88-98 Finally, let's set parameters to ensure the simulation runs smoothly. There are a lot of numerical parameters, so we'll explain what these mean. First, let's consider the time-stepping. HYDRAD solves its equations explicitly, meaning that the CFL condition must be met at all times for numerical stability. This means that the time-step, :math:`dt`, must always be sufficiently small to produce an accurate numerical solution. Let's first set "safety" parameters for the radiation and conduction time-scales, which simply reduce their values to make it more likely that the CFL condition is met. .. GENERATED FROM PYTHON SOURCE LINES 98-101 .. code-block:: Python config['solver']['safety_radiation'] = 0.1 config['solver']['safety_conduction'] = 0.1 .. GENERATED FROM PYTHON SOURCE LINES 102-103 Since conduction can be extremely limiting, we also set an effective floor: .. GENERATED FROM PYTHON SOURCE LINES 103-105 .. code-block:: Python config['general']['heat_flux_timestep_limit'] = 1e-6 * u.s .. GENERATED FROM PYTHON SOURCE LINES 106-110 Next, we want to make sure that the grid is spatially resolved We are telling the code to refine the grid every time step, and that any grid cell can be refined up to 12 times. For extremely strong heating events, you might consider increasing this to 14. .. GENERATED FROM PYTHON SOURCE LINES 110-114 .. code-block:: Python config['solver']['adapt_every_n_time_steps'] = 1 config['solver']['initial_refinement_level'] = 12 config['solver']['maximum_refinement_level'] = 12 .. GENERATED FROM PYTHON SOURCE LINES 115-117 Finally, we change a few parameters from their defaults, only for stability Do not check for numerical precision errors in the conservation of energy: .. GENERATED FROM PYTHON SOURCE LINES 117-119 .. code-block:: Python config['solver']['enforce_conservation'] = False .. GENERATED FROM PYTHON SOURCE LINES 120-121 Do not refine the grid on hydrogen energy: .. GENERATED FROM PYTHON SOURCE LINES 121-124 .. code-block:: Python config['solver']['refine_on_hydrogen_energy'] = False .. GENERATED FROM PYTHON SOURCE LINES 125-127 As in the basic tutorial, we now use the configuration defined here to set up the simulation by writing configuration files. .. GENERATED FROM PYTHON SOURCE LINES 127-133 .. code-block:: Python c = Configure(config) tmpdir = pathlib.Path(tempfile.mkdtemp()) # Change this to wherever you want to save the unedited HYDRAD copy hydrad_clean = tmpdir / 'hydrad-clean' get_clean_hydrad(hydrad_clean, from_github=True) c.setup_simulation(tmpdir / 'test-run', hydrad_clean) # The location of the simulation itself .. rst-class:: sphx-glr-script-out .. code-block:: none WARNING: ../source/main.cpp: In function ‘int AddChromospheres(int, double*, double*, double*, double*, double*, PARAMETERS, PPIECEWISEFIT)’: ../source/main.cpp:691:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 691 | fscanf( pFile, "%i", &iVALTemperatureDP ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../source/misc.cpp: In function ‘void GetConfigurationParameters(PARAMETERS*)’: ../source/misc.cpp:31:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 31 | fscanf( pFile, "%s", pParams->szOutputFilename ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp: In member function ‘void CElement::OpenRangesFile(char*)’: ../../Radiation_Model/source/element.cpp:63:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 63 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:66:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 66 | fscanf( pFile, "%i", &NumTemp ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:67:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 67 | fscanf( pFile, "%i", &NumDen ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:76:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 76 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:85:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 85 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp: In member function ‘void CElement::OpenAbundanceFile(char*)’: ../../Radiation_Model/source/element.cpp:105:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 105 | fscanf( pFile, "%i", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:121:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 121 | fscanf( pFile, "%i", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp: In member function ‘void CElement::OpenEmissivityFile(char*)’: ../../Radiation_Model/source/element.cpp:152:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 152 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:154:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 154 | fscanf( pFile, "%i", &NumIons ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:162:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 162 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:166:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 166 | fscanf( pFile, "%i", &pSpecNum[i] ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:184:15: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 184 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp: In member function ‘void CElement::OpenRatesFile(char*)’: ../../Radiation_Model/source/element.cpp:237:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 237 | fscanf( pFile, "%s", buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:251:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 251 | fscanf( pFile, "%s", buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp: In member function ‘void CRadiation::Initialise(char*)’: ../../Radiation_Model/source/radiation.cpp:92:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 92 | fscanf( pFile, "%s", buffer1 ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:96:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 96 | fscanf( pFile, "%s", buffer2 ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:99:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 99 | fscanf( pFile, "%s", buffer3 ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:103:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 103 | fscanf( pFile, "%s", buffer4 ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:106:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 106 | fscanf( pFile, "%i", &NumElements ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:117:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 117 | fscanf( pFile, "%s", buffer1 ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:120:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 120 | fscanf( pFile, "%i", &(pZ[i]) ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp: In member function ‘void CRadiation::OpenRangesFile(char*)’: ../../Radiation_Model/source/radiation.cpp:156:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 156 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:159:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 159 | fscanf( pFile, "%i", &NumTemp ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:160:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 160 | fscanf( pFile, "%i", &NumDen ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:169:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 169 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:178:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 178 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp: In member function ‘void COpticallyThickIon::GetAbundData(char*)’: ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:100:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 100 | fscanf( pFile, "%i", &(iZ[i]) ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:118:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 118 | fscanf( pFile, "%i", &(iZ[i]) ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:141:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 141 | fscanf( pFile, "%i", &iNumMasses ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:145:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 145 | fscanf( pFile, "%i", &iBuffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp: In member function ‘void COpticallyThickIon::GetIonFracData(char*)’: ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:177:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 177 | fscanf( pFile, "%i", &iIonFracDP ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp: In member function ‘void COpticallyThickIon::GetEmissData(char*)’: ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:203:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 203 | fscanf( pFile, "%i", &iEmissDP ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp: In member function ‘void COpticallyThickIon::GetEscProbData(char*)’: ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:241:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 241 | fscanf( pFile, "%i", &iEscProbDP ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp: In member function ‘void COpticallyThickIon::Getkappa_0Data(char*)’: ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:272:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 272 | fscanf( pFile, "%i", &ikappa_0DP ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp: In member function ‘void CPieceWiseFit::OpenPieceWiseFit(char*)’: ../../Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp:49:23: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 49 | fscanf( pInputFile, "%i", &iPolyOrder ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp:51:23: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 51 | fscanf( pInputFile, "%i", &inumSD ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp: In member function ‘void CPieceWiseFit::GeneratePieceWiseFit(char*, char*)’: ../../Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp:92:23: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 92 | fscanf( pInputFile, "%i", &iPolyOrder ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp:99:23: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 99 | fscanf( pInputFile, "%i", &inumSD ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp:106:23: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 106 | fscanf( pInputFile, "%i", &inumPoints ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Resources/source/file.cpp: In function ‘void ReadDouble(void*, double*)’: ../../Resources/source/file.cpp:24:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 24 | fscanf( pFile, "%s", buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ [pydrad.configure.util] INFO: Calculating initial hydrostatic conditions... Peak heating range = 1.1272e-05 -> 1.1298e-05 erg cm^-3 s^-1 Optimum peak heating rate = 1.1297e-05 erg cm^-3 s^-1 Writing initial conditions file... Done! [pydrad.configure.util] WARNING: ../source/mesh.cpp: In member function ‘void CAdaptiveMesh::CreateInitialMesh()’: ../source/mesh.cpp:84:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 84 | fscanf( pFile, "%i", &iFileNumber ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../source/mesh.cpp:88:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 88 | fscanf( pFile, "%i", &Params.iNumberOfCells ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../source/mesh.cpp:112:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 112 | fscanf( pFile, "%i", &(CellProperties.iRefinementLevel) ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../source/mesh.cpp:114:15: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 114 | fscanf( pFile, "%i", &(CellProperties.iUniqueID[j]) ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../source/eqns.cpp: In member function ‘void CEquations::Initialise()’: ../source/eqns.cpp:131:23: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 131 | fscanf( pFile, "%s", Params.Profiles ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../source/eqns.cpp:133:23: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 133 | fscanf( pFile, "%s", Params.GravityFilename ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../source/eqns.cpp:147:23: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 147 | fscanf( pFile, "%i", &iTemp ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ ../../Heating_Model/source/heat.cpp: In member function ‘void CHeat::GetHeatingData()’: ../../Heating_Model/source/heat.cpp:104:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 104 | fscanf( pConfigFile, "%i", &NumActivatedEvents ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Heating_Model/source/heat.cpp: In member function ‘void CHeat::GetBeamHeatingData()’: ../../Heating_Model/source/heat.cpp:159:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 159 | fscanf( pConfigFile, "%i", &iBeamHeatingDP ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Heating_Model/source/heat.cpp:163:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 163 | fscanf( pConfigFile, "%s", szBuffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Heating_Model/source/heat.cpp:164:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 164 | fscanf( pConfigFile, "%s", szBuffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Heating_Model/source/heat.cpp:165:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 165 | fscanf( pConfigFile, "%s", szBuffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Heating_Model/source/heat.cpp:166:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 166 | fscanf( pConfigFile, "%s", szBuffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Heating_Model/source/heat.cpp:167:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 167 | fscanf( pConfigFile, "%s", szBuffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Heating_Model/source/heat.cpp:168:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 168 | fscanf( pConfigFile, "%s", szBuffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Heating_Model/source/heat.cpp:169:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 169 | fscanf( pConfigFile, "%s", szBuffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Heating_Model/source/heat.cpp: In member function ‘void CHeat::GetVALHeatingData()’: ../../Heating_Model/source/heat.cpp:219:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 219 | fscanf( pFile, "%i", &iVALHeatingDP ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/ionfrac.cpp: In member function ‘void CIonFrac::Initialise(CIonFrac*, char*, PRADIATION)’: ../../Radiation_Model/source/ionfrac.cpp:49:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 49 | fscanf( pFile, "%s", buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/ionfrac.cpp:52:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 52 | fscanf( pFile, "%s", buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/ionfrac.cpp:55:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 55 | fscanf( pFile, "%s", buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/ionfrac.cpp:58:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 58 | fscanf( pFile, "%s", buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/ionfrac.cpp:61:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 61 | fscanf( pFile, "%i", &NumElements ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/ionfrac.cpp:74:15: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 74 | fscanf( pFile, "%s", buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/ionfrac.cpp:77:15: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 77 | fscanf( pFile, "%i", &(pZ[i]) ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/ionfrac.cpp: In member function ‘void CIonFrac::ReadAllIonFracFromFile(void*)’: ../../Radiation_Model/source/ionfrac.cpp:199:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 199 | fscanf( (FILE*)pFile, "%i", &(pZ[i]) ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/ionfrac.cpp: In member function ‘void CIonFrac::ReadIonFracFromFile(void*, int)’: ../../Radiation_Model/source/ionfrac.cpp:216:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 216 | fscanf( (FILE*)pFile, "%i", &(pZ[i]) ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp: In member function ‘void CElement::OpenRangesFile(char*)’: ../../Radiation_Model/source/element.cpp:63:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 63 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:66:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 66 | fscanf( pFile, "%i", &NumTemp ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:67:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 67 | fscanf( pFile, "%i", &NumDen ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:76:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 76 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:85:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 85 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp: In member function ‘void CElement::OpenAbundanceFile(char*)’: ../../Radiation_Model/source/element.cpp:105:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 105 | fscanf( pFile, "%i", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:121:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 121 | fscanf( pFile, "%i", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp: In member function ‘void CElement::OpenEmissivityFile(char*)’: ../../Radiation_Model/source/element.cpp:152:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 152 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:154:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 154 | fscanf( pFile, "%i", &NumIons ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:162:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 162 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:166:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 166 | fscanf( pFile, "%i", &pSpecNum[i] ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:184:15: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 184 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp: In member function ‘void CElement::OpenRatesFile(char*)’: ../../Radiation_Model/source/element.cpp:237:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 237 | fscanf( pFile, "%s", buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/element.cpp:251:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 251 | fscanf( pFile, "%s", buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp: In member function ‘void CRadiation::Initialise(char*)’: ../../Radiation_Model/source/radiation.cpp:92:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 92 | fscanf( pFile, "%s", buffer1 ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:96:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 96 | fscanf( pFile, "%s", buffer2 ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:99:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 99 | fscanf( pFile, "%s", buffer3 ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:103:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 103 | fscanf( pFile, "%s", buffer4 ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:106:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 106 | fscanf( pFile, "%i", &NumElements ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:117:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 117 | fscanf( pFile, "%s", buffer1 ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:120:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 120 | fscanf( pFile, "%i", &(pZ[i]) ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp: In member function ‘void CRadiation::OpenRangesFile(char*)’: ../../Radiation_Model/source/radiation.cpp:156:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 156 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:159:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 159 | fscanf( pFile, "%i", &NumTemp ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:160:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 160 | fscanf( pFile, "%i", &NumDen ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:169:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 169 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/radiation.cpp:178:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 178 | fscanf( pFile, "%c", &buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp: In member function ‘void COpticallyThickIon::GetAbundData(char*)’: ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:100:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 100 | fscanf( pFile, "%i", &(iZ[i]) ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:118:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 118 | fscanf( pFile, "%i", &(iZ[i]) ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:141:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 141 | fscanf( pFile, "%i", &iNumMasses ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:145:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 145 | fscanf( pFile, "%i", &iBuffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp: In member function ‘void COpticallyThickIon::GetIonFracData(char*)’: ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:177:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 177 | fscanf( pFile, "%i", &iIonFracDP ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp: In member function ‘void COpticallyThickIon::GetEmissData(char*)’: ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:203:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 203 | fscanf( pFile, "%i", &iEmissDP ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp: In member function ‘void COpticallyThickIon::GetEscProbData(char*)’: ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:241:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 241 | fscanf( pFile, "%i", &iEscProbDP ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp: In member function ‘void COpticallyThickIon::Getkappa_0Data(char*)’: ../../Radiation_Model/source/OpticallyThick/OpticallyThickIon.cpp:272:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 272 | fscanf( pFile, "%i", &ikappa_0DP ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp: In member function ‘void CPieceWiseFit::OpenPieceWiseFit(char*)’: ../../Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp:49:23: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 49 | fscanf( pInputFile, "%i", &iPolyOrder ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp:51:23: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 51 | fscanf( pInputFile, "%i", &inumSD ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp: In member function ‘void CPieceWiseFit::GeneratePieceWiseFit(char*, char*)’: ../../Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp:92:23: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 92 | fscanf( pInputFile, "%i", &iPolyOrder ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp:99:23: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 99 | fscanf( pInputFile, "%i", &inumSD ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Resources/Utils/generatePieceWiseFit/source/piecewisefit.cpp:106:23: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 106 | fscanf( pInputFile, "%i", &inumPoints ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Resources/source/file.cpp: In function ‘void ReadDouble(void*, double*)’: ../../Resources/source/file.cpp:24:7: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 24 | fscanf( pFile, "%s", buffer ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ [pydrad.configure.util] .. GENERATED FROM PYTHON SOURCE LINES 134-138 This will have set up the simulation, which can now be run! Since beam heating simulations can be somewhat slower, it is recommended to run this by hand in a terminal. Also, if using Mac, be sure to use the "caffeinate" command to keep the computer from sleeping. .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 13.938 seconds) .. _sphx_glr_download_generated_gallery_configure_beam_simulation.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: configure_beam_simulation.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: configure_beam_simulation.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: configure_beam_simulation.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_