Page 1 of 1

Wrong display of vertical soil compression stresses

Posted: Sun Apr 03, 2022 3:43 pm
by Carlotta
Dear STKO team,
I'm starting from the scratch in using both STKO and Python programmig language.
I need to do gravity analysis on a soil domain which is formed by a soil deposit on top of a bedrock layer.
I built the geometry of the 2D model with Python API, then I drew construction lines to get the quadrilateral mesh and then I did the merge operation on the entire geometry (below I attached the files of the whole model and the Python scrip).
The results that I got do not seem to be correct, because I should obtain compression vertical stresses starting from zero on the surface of the soil deposit up to a maximum value at the base of the bedrock.
How can I fix this?
I think there is more than one problem with my model but I noticed that the local axis are not the same for all elements and, if I add a custom local axis, it will not be displayed as it should be (like global axis).
Could the problem be in the construction of the geometry with Python API ?

Thanks for your support.

Re: Wrong display of vertical soil compression stresses

Posted: Tue Apr 05, 2022 3:03 pm
by STKO Team
I'm starting from the scratch in using both STKO and Python programmig language.
Nice job! creating the geometry in python is not so easy.

First there was a mistake in the boundary conditions. You fixed in X the bottom line, and in Y the vertical sided, while it should be the opposite.

With this modification, you will see that the soil deposit will move upward instead of downward because, when you drew the geometry, the face normal vector was pointing in -Z (0,0,-1). In OpenSees 2D models this is invalid because the makes the Jacobian of the element negative. A negative jacobian means a negative area, and the results are all wrong!

If you want to modify your model as I did, you can use the Reverse command which allows you to change the normal vector of a face, or the tangent vector of a curve (after you need to re-mesh your model):
negative_jacobian.png
negative_jacobian.png (67.76 KiB) Viewed 1973 times
Otherwise, if you want to create it with the correct normal directly from the Python script, you can just reverse the list of edges used to build the wire for the deposit face:
e_wrire.reverse() (see the attached python file)

Here is the working model and the python file
soil_domain.zip
(156.86 KiB) Downloaded 188 times

Re: Wrong display of vertical soil compression stresses

Posted: Tue Apr 05, 2022 4:04 pm
by Carlotta
Thank you for the reply and thanks for the suggestions!

Re: Wrong display of vertical soil compression stresses

Posted: Tue Apr 05, 2022 5:25 pm
by STKO Team
You're welcome