New SfePy user - materials, regions, equations - interactive vs. script modes
Hi I am a new SfePy user and have several questions. I have looked through the documentation and this mailing list extensively as well as many of the examples.
Firstly, there seems to be differences in the code between interactive iPython mode and writing .py files. For example, the documentation of the equation block [1] is different than entering equations interactively [2]. Is there any documentation describing these differences? I would like to use both methods.
I am still trying to understand how to define specific regions in the mesh and assign them specific material values. For example take the circle_in_square.mesh provided in the install, I would like to assign different material values (such as viscosity) for the circle and the square and then calculate stress and strain rate variations by applying shear stress boundary conditions.
Any help and advice is appreciated, once I work through this I would be happy to contribute a beginners-beginner guide to SfePy from my experience.
Ben
[1] http://sfepy.org/doc-devel/users_guide.html#syntax-of-terms-in-equations [2] http://sfepy.org/doc-devel/tutorial.html#sec-interactive-example-linear-elas...
Hi Ben,
On 01/12/2018 10:01 PM, Ben Melosh wrote:
Hi I am a new SfePy user and have several questions. I have looked through the documentation and this mailing list extensively as well as many of the examples.
Firstly, there seems to be differences in the code between interactive iPython mode and writing .py files. For example, the documentation of the equation block [1] is different than entering equations interactively [2]. Is there any documentation describing these differences? I would like to use both methods.
The syntax of equations in a problem description file is introduced in [3]. The interactive syntax is not well documented (mostly just by examples).
I am still trying to understand how to define specific regions in the mesh and assign them specific material values. For example take the circle_in_square.mesh provided in the install, I would like to assign different material values (such as viscosity) for the circle and the square and then calculate stress and strain rate variations by applying shear stress boundary conditions.
The easiest way of doing that is as follows [4]:
- you need to define regions, where the parameters are constant (let's say Omega1, Omega2).
- and then just specify the values for each of the regions:
materials = { 'm': ({'coef': {'Omega1': 1.0, 'Omega2': 10.0}},), }
The general way of defining non-homogeneous material parameters is to use a function [5].
Any help and advice is appreciated, once I work through this I would be happy to contribute a beginners-beginner guide to SfePy from my experience.
That would be great!
r.
[3] http://sfepy.org/doc-devel/users_guide.html#equations-and-terms [4] http://sfepy.org/doc-devel/users_guide.html#materials [5] http://sfepy.org/doc-devel/users_guide.html#defining-material-parameters
Ben
[1] http://sfepy.org/doc-devel/users_guide.html#syntax-of-terms-in-equations [2] http://sfepy.org/doc-devel/tutorial.html#sec-interactive-example-linear-elas...
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
participants (2)
-
Ben Melosh
-
Robert Cimrman