[CIG-SHORT] [Pylith] Gravity in 2D problems

Lucas Abraham Willemsen lawillem at MIT.EDU
Mon Mar 4 13:34:23 PST 2013


Hello,

I have used CUBIT to generate a 2D mesh. This mesh is in the X-Y coordinate system, and as far as I know a 2D mesh cannot be written in the X-Z coordinate system. (This would have prevented the problem I will describe below)

I then read this mesh into pylith and turn on gravity in pylithapp.cfg. The gravity does not work. The reason for this is that site-packages/spatialdata/spatialdb/GravityField.py defines:

gravityDir = pyre.inventory.list("gravity_dir", default=[0.0,0.0,-1.0])

Which is in the Z-direction. And the 2D mesh I get from cubit is forced to be in the X-Y plane with Y being depth.

If I change this into

'gravityDir = pyre.inventory.list("gravity_dir", default=[0.0,-1.0,0.0])'

I basically direct it in the Y-direction which is depth in my mesh. Now the gravity functionality correctly generates the vertical stress gradient I would expect.

My question is: Is it possible to locally override GravityField.py for a specific project only ? I tried putting GravityField.py in my project directory in the hope that Pylith would grab this instead of the one in site-packages. I prefer not to change the original in site-packages. First of all this is probably not best practice, but also I'm not sure if the cluster I will run the project on allows me to modify the Pylith installation. Does anyone know an elegant solution to this problem? I'm using the binary distribution of Pylith on Linux and I don't have a very in-depth knowledge of the structure of the source-code.

sincerely,
Lucas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://geodynamics.org/pipermail/cig-short/attachments/20130304/1237b232/attachment.htm 


More information about the CIG-SHORT mailing list