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

Quadratic stress-strain relation in Python elasticity solver #121

Merged
merged 3 commits into from
Feb 16, 2017

Conversation

ketch
Copy link
Member

@ketch ketch commented Feb 15, 2017

This adds an option to use a quadratic stress-strain relation in the Python version (only) of the nonlinear elasticity solver. Previously the only relation available was exponential, which is still the default. I'm using the quadratic relation for a chapter in the Riemann solvers book.

The choice of which relation to use is controlled by setting state.problem_data['stress relation'] to either exponential (default) or quadratic.

The solver could be adapted to other relations without modifying this file by just overriding sigma() and sigmap().

@mandli
Copy link
Member

mandli commented Feb 15, 2017

This may be a bit pedantic but I was wondering if there was any reason we may not want to have an underscore rather than the space in the key. Everything else looks good to me.

@mandli
Copy link
Member

mandli commented Feb 16, 2017

Something before I forget, I think we should make a policy to remove the copyright statements from all the source as almost all are outdated and they are not really needed anymore. Maybe we can post this suggestion to claw-dev and if no one responds go through and remove all of these for those we know (cannot really for people we do not have explicit permission from I think).

@ketch
Copy link
Member Author

ketch commented Feb 16, 2017

I was wondering if there was any reason we may not want to have an underscore rather than the space in the key.

Is there a reason to prefer one or the other?

we should make a policy to remove the copyright statements

Yes, I opened an issue. All those statements that I can find belong to @ketch or @mandli.

@mandli
Copy link
Member

mandli commented Feb 16, 2017

I was wondering if there was any reason we may not want to have an underscore rather than the space in the key.

Is there a reason to prefer one or the other?

I could think of a reason to use the space as it is more readable and could lead to nice labels if you wanted to do display the keys. On the other hand if you wanted to specify a key on the command line an escape would be needed. I don't actually have a case currently where this might be a problem but we in the future allowed specification of problem_data via the command line this would start to become a nuisance.

Just to be clear I am more thinking out loud and do not have a strong opinion on this.

@ketch
Copy link
Member Author

ketch commented Feb 16, 2017

Okay, you convinced me and I've made the change.

@mandli mandli merged commit b1e8b69 into clawpack:master Feb 16, 2017
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