How to use the pymars.sensitivity_analysis.run_sa function in pymars

To help you get started, we’ve selected a few pymars examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Niemeyer-Research-Group / pyMARS / pymars / pymars.py View on Github external
error_limit, target_species, safe_species, phase_name=phase_name,
            num_threads=num_threads, path=path
            )
    
    error = 0.0
    limbo_species = []
    if method in ['DRG', 'DRGEP', 'PFA']:
        model_file = reduced_model.filename
        error = reduced_model.error
        limbo_species = reduced_model.limbo_species

    if run_sensitivity_analysis:
        if not sensitivity_type:
            sensitivity_type = 'greedy'

        reduced_model = run_sa(
            model_file, error, ignition_conditions, psr_conditions, flame_conditions, 
            error_limit, target_species + safe_species, phase_name=phase_name,
            algorithm_type=sensitivity_type, species_limbo=limbo_species, 
            num_threads=num_threads, path=path
            )
   
    return reduced_model