Scalar initialisation
There are different ways to initialize the initial concentration, but one simple method is to generate a .h5 file using the tools/init.py script.
A template fonction to add to this script is
def init_my_case():
n_compartment=500
n_species=4
liquid_phase = np.zeros((n_compartment,n_species))
gas_phase = np.zeros((n_compartment,n_species))
gas_phase[:,0]=0
gas_phase[:,1]=0.21
liquid_phase[:,0]=5
liquid_phase[:,1]=0
make_initial_concentration("./cma_data/my-case-init.h5",liquid_phase,gas_phase)
CLI
Running the simulation directly through the command line with arguments passed to the executable is not recommended due to the complexity involved. Instead, the preferred approach is to use the runner Python script and provide a specific case descriptor file. Below is a template for the case descriptor file, which should be in XML format:
<?xml version="1.0" encoding="UTF-8"?>
<cases>
<control name="my-case">
<cma_case_path recursive="true">/path/to/cma_case/</cma_case_path>
<final_time>10</final_time>
<number_particle>50000</number_particle>
<delta_time>0</delta_time>
<results_file_name>debug</results_file_name>
<number_exported_result>100</number_exported_result>
<model_name>_</model_name>
<initialiser_path>./cma_data/my-case-init.h5</initialiser_path>
</control>
</cases>