-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configuration options to dictate solving a full-order model for snapshot creation #95
Comments
In the following a few ideas for the configuration, sticking with the "json"-configuration and not adding another configuration file for the input parameters for now. "simulation_type": "snapshot"
"simulation_type": "coupling" Alternatively, the executed class (MicroManager/ SnapshotComputation) could transmit information internally to the Config class by adding another argument to the constructor
Looking at the input parameters in On-the-Fly Adaptive Twoscale Simulations, there are two options to configure the macro data: "snapshot_params": [{
"macro_data": "direction",
"relation": "base",
"operation": "mesh",
"input_type": "interval",
"data": [["start", "end", "number"], ["start", "end", "number"]]
},
{
"macro_data": "amplitude",
"relation": "foreach",
"operation": "plain",
"input_type": "list",
"data": [["x_1"], ["x_2"], ["x_3"]]
}
] where "foreach" tells the snapshot computation to multiply each amplitude value with every direction value and "mesh" makes the snapshot data create a mesh with the data points. Each set "snapshot_params": {
"macro_data": "strain",
"input_type": "interval",
"data": [["start", "end", "number"], ["start", "end", "number"]],
} The intervals could alternatively be specified as "input_type": "interval",
"data": {
"start": ["start1", "start2"],
"end": ["end1", "end2"],
"number": "num"
} and the alternative with a complete list: "input_type": "list",
"data": [["x_1", "y_1"], ["x_2", "y_2"]], Furthermore, storing the data in a separate configuration file could make sense from the beginning to keep configuration and parameters separate. Besides a clear separation, it would make exchanging data possible with next to no change to the configuration file. In this case, the configuration file would need information about where to find the "data" parts:
|
A complete configuration file for the snapshot parameter configuration could be {
"micro_file_name": "full_order_model",
"snapshot_params": {
"read_data_names": {"strain": "vector"},
"write_data_names": {"stress": "vector", "stiffness": "vector"}
},
"snapshot_data": {
"macro_data": "strain",
"input_type": "interval",
"number_of_steps": 10,
"data": ["[start, end]", "[start, end]", "[start, end]", "[start, end]", "[start, end]", "[start, end]"],
}
} where The configuration would be easily extendable to multiple input parameters by adding it to When the entire sequence of parameters is given as input, the configuration could have the following form: {
"micro_file_name": "full_oder_model",
"snapshot_params": {
"read_data_names": {"strain": "vector"},
"write_data_names": {"stress": "vector", "stiffness": "vector"}
},
"snapshot_data": {
"macro_data": "strain",
"input_type": "list",
"data": ["[x1, x2, x3, x4, x5, x6]", "[y1, y2, y3, y4, y5, y6]"],
}
} Alternatively, if parameters are stored in a separate file, the configuration could look like this: {
"micro_file_name": "full_order_model",
"snapshot_params": {
"parameter_file_name": "parameters.file",
"read_data_names": {"strain": "vector"},
"write_data_names": {"stress": "vector", "stiffness": "vector"}
}
} |
Good concepts, but feels a bit too tailored towards the materials usecase. Maybe sth programmable could be better for the time being, not to over-engineer too early. Programmable could here also mean to keep it in Python. Maybe, I have overlooked this, but the rescaling is currently missing, meaning equation (16) in Fritzen et al. 2019. |
My understanding from an in-person discussion is that, for the moment, the JSON configuration file should only provide an hdf5-file name and location telling the snapshot tool where to read macro parameters from and where to write micro outputs. The dataset in the hdf5 file will be set up in preprocessing. Thus, for the moment, the configuration file for the snapshot computation would look as follows: {
"micro_file_name": "full_order_model",
"snapshot_params": {
"parameter_file_name": "parameters.hdf5",
"read_data_names": {"macro_parameter1": "vector", "macro_parameter2": "scalar"},
"write_data_names": {"micro_parameter1": "vector"}
}
} Providing information in |
But these should already be covered through the "normal" configuration, right? I would not duplicate these as they would stay the same for most applications? |
This issue is mainly to discuss how the configuration functionality to dictate solving a full-order model for snapshot creation would look like.
The text was updated successfully, but these errors were encountered: