Skip to content
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 support for using dict inside config file #57

Merged
merged 7 commits into from
May 11, 2023

Conversation

keiyamamo
Copy link
Collaborator

This is draft and under testing.

@keiyamamo
Copy link
Collaborator Author

This PR adds support for using dict inside the config file. Even though we have two default variables solid/fluid_properties
that are expected to be dict type, it was not possible to pass dict inside the config file. This is due to the fact that you do not need to use solid_properties for St. Venant Kirchoff model, but is required for other material models.

With this change, you can create dict inside the config file as follows

[solid]
solid_properties : {   
    material_model: MooneyRivlin,
    rho_s: 1.0E3,
    mu_s: 0.1724E6,
    lambda_s: 1.55E6,
    C01: 0.02E6,
    C10: 0.0,
    C11: 1E6
    }

[fluid]
fluid_properties : {
    dx_f_id: 2,
    rho_f: 1,
    mu_f: 1E3
    }

Here, I use section heading [solid/fluid], but you just need at least one section heading for new version to work.
A major change from previous version is that now we do not use ’' for str type variable.
For example, previously we had

# Turn on/off solving of the fluid problem ('fluid', 'no_fluid')
fluid="fluid"

but now it should be

# Turn on/off solving of the fluid problem ('fluid', 'no_fluid')
fluid=fluid

but everything else should work as before. Could @johannesring please check this ?

@keiyamamo keiyamamo marked this pull request as ready for review May 10, 2023 09:03
@keiyamamo keiyamamo merged commit f89397c into KVSlab:master May 11, 2023
@keiyamamo keiyamamo deleted the dict_config branch May 11, 2023 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants