mesh2scattering.output#
Write output for mesh2scattering.
Functions:
|
Generate project report from NumCalc output files. |
|
Process NumCalc output and write data to disk. |
- mesh2scattering.output.write_output_report(folder=None)[source]#
Generate project report from NumCalc output files.
NumCalc (mesh2scattering’s numerical core) writes information about the simulations to the files NC*.out located under NumCalc/source_*. The file NC.out exists if NumCalc was ran without the additional command line parameters
-istartand-iend. If these parameters were used, there is at least one NC*-*.out. If this is the case, information from NC*-*.out overwrites information from NC.out in the project report.Note
The project reports are written to the files report/report_source_*.csv. If issues were detected, they are listed in report/report_issues.csv.
The report contain the following information
- Frequency step
The index of the frequency.
- Frequency in Hz
The frequency in Hz.
- NC input
Name of the input file from which the information was taken.
- Input check passed
Contains a 1 if the check of the input data passed and a 0 otherwise. If the check failed for one frequency, the following frequencies might be affected as well.
- Converged
Contains a 1 if the simulation converged and a 0 otherwise. If the simulation did not converge, the relative error might be high.
- Num. iterations
The number of iterations that were required to converge
- relative error
The relative error of the final simulation
- Comp. time total
The total computation time in seconds
- Comp. time assembling
The computation time for assembling the matrices in seconds
- Comp. time solving
The computation time for solving the matrices in seconds
- Comp. time post-proc
The computation time for post-processing the results in seconds
- Parameters:
folder (str, optional) – The path of the NumCalc project folder, i.e., the folder containing the subfolders EvaluationsGrids, NumCalc, and ObjectMeshes. The default,
Noneuses the current working directory.- Returns:
found_issues (bool) –
Trueif issues were found,Falseotherwisereport (str) – The report or an empty string if no issues were found
- mesh2scattering.output.write_pressure(folder)[source]#
Process NumCalc output and write data to disk.
Processing the data is done in the following steps
Read project parameter from parameters.json
use
write_output_reportto parse files in project_folder/NumCalc/source_*/NC*.out, write project report to project_folder/report/report_source_*.csv. Raise a warning if any issues were detected and write report_issues.txt to the same folderRead simulated pressures from project_folder/NumCalc/source_*/be.out. This and the following steps are done, even if an issue was detected in the previous step
save the sound pressure for each evaluation grid to save the a SOFA file
- Parameters:
folder (str, optional) – The path of the NumCalc project folder, i.e., the folder containing the subfolders EvaluationsGrids, NumCalc, and ObjectMeshes.