pythonmathnumerical-methodsdifferential-equationsfinite-element-analysis

Using sfepy to solve a simple 2D differential euqation


I am trying to learn sfepy. To that effect I want to solve the differential equation

enter image description here

On a triangle domain (2D).

There';s 2 things I don't understand from reading the docs.

  1. How do I specify a single triangle mesh? The code seems to assume you already have the mesh file but it does not provide a link to it so I don;t know hwo to cosntruct my data.

  2. I am having a ahrd time learning how to map the equation onto sfepy's syntax. i.e. I don;t really know how to specify the problem using the library even after followignt he tutorial.


Solution

  • I have the solution to your problem 1.

    The example script linear_elastic_interactive.py, does mention the path to the mesh used on line 35, like this mesh = Mesh.from_file(data_dir + '/meshes/2d/rectangle_tri.mesh') . And the tutorial also mentions that "This file should be run from the top-level SfePy source directory so it can find the mesh file correctly". So if you navigate the source code, you can find the mesh here: link