Exemple #1
0
                   max_value=1)
op4 = pr.Parameter(name='specific_heat',
                   place_holder='SPECIFIC_HEAT',
                   min_value=0.01,
                   max_value=10)
ops = pr.ParameterSet(params=[op1, op2, op3, op4])

# define general model parameter, including optimisation parameter
mps = pr.ParameterSet(params=[op1, op2, op3, op4])
mps.append(pr.Parameter(name='chid', place_holder='CHID', value=CHID))

# define empty simulation setup set
setups = pr.SimulationSetupSet()

# define model-experiment data relation
r1 = pr.Relation()
r1.model.file_name = "{}_devc.csv".format(CHID)
r1.model.label_x = 'Time'
r1.model.label_y = 'temp'
r1.model.header_line = 1
r1.experiment.file_name = "experimental_data.csv"
r1.experiment.label_x = 'time'
r1.experiment.label_y = 'temp'
r1.experiment.header_line = 0
r1.fitness_method = pr.FitnessMethodRMSE(n_points=100)

r2 = pr.Relation()
r2.model.file_name = "{}_devc.csv".format(CHID)
r2.model.label_x = 'Time'
r2.model.label_y = 'temp'
r2.model.header_line = 1
Exemple #2
0
mps0 = pr.ParameterSet(params=[op1, op2])
mps0.append(pr.Parameter(name='heat flux', place_holder='exflux', value=75))
mps0.append(pr.Parameter(name='tend', place_holder='tend'))
mps0.append(pr.Parameter(name='mesh_i', place_holder='i', value=3))
mps0.append(pr.Parameter(name='mesh_j', place_holder='j', value=3))
mps0.append(pr.Parameter(name='mesh_k', place_holder='k', value=4))
mps0.append(pr.Parameter(name='chid', place_holder='filename', value=CHID))

# define empty simulation setup set
setups = pr.SimulationSetupSet()

# loop over all 'iso' values
for iso in ['Alu', 'ISO']:

    # define model-experiment data relation
    r = pr.Relation()
    r.model.file_name = "{}_hrr.csv".format(CHID)
    r.model.label_x = 'Time'
    r.model.label_y = 'MLR_TOTAL'
    r.model.header_line = 1
    r.experiment.file_name = "Data.csv"
    r.experiment.label_x = '# Time_{}_75'.format(iso)
    r.experiment.label_y = 'SG_{}_75'.format(iso)
    r.experiment.header_line = 0
    r.experiment.yfactor = 1e-3
    r.fitness_method = pr.FitnessMethodRMSE(n_points=100)

    # use above model prototype (mps0) as template
    mps = copy.deepcopy(mps0)

    TEND = 600
Exemple #3
0
                                                         para_set]))))
    return ps

# Calls the above function to create multiple parameter sets for the different
# simulation setups. The parameter sets (objects) are then stored in a list.
model_parameter_setups = [create_mod_par_setup(i) for i in range(
    len(HeatingRatesTGA))]


# Create a list of relations between experimental and model (simulation) data,
# for each experimental data series. (Could also be nested, if there would be
# multiple repetitions for each experiment.)
r = []
for i in range(len(HeatingRatesTGA)):
    # Initialise a relation.
    relation = pr.Relation()
    # Information on simulation data.
    relation.model.file_name = '{}_{}K_tga.csv'.format(CHID,
                                                       str(HeatingRatesTGA[i]))
    relation.model.label_x = 'Time'
    relation.model.label_y = 'MLR'
    relation.model.header_line = 1

    # Information on experimental data.
    relation.experiment.file_name = experimental_data_file_list[i]
    relation.experiment.label_x = 'Time'
    relation.experiment.label_y = 'MassLossRate'
    relation.experiment.header_line = 0

    # Define definition set for data comparison. Basically providing the
    # amount and position of data points in x-axis, by determining the range