Define up_dir value

Dear everyone,

I would like to ask how to define up_dir value as written in the example of 3d subduction-step03.cfg.

In the example, it is written (0,0,1). I have searched in the manual but could not find it.

Thank you in advance.

Best Regards,
Alvina KK

Dear Alvina,
The up_dir should be written as a list: e.g., [0,0,1]. This is described in section 6.4.3 of the manual. It is probably also described in the section related to the example you mention.


This is also discussed in the examples section of the manual (7.18.7) that discusses the example you mention.


Dear Charles,

Thank you for your reply.

Does it mean that if I have my own geometry, the up_dir value has to be defined with the same value 0.0.1 ?

Thank you in advance.

Alvina KK

We can provide more guidance if you explain what you are trying to do. Note that the default up_dir is [0,0,1], so in most cases you do not need to specify it.

I would like to do interseismic and earthquake cycle simulation using my own geometry (figure attached below).
The white block is the oceanic crust, the pink block is the accretionary wedge, the chocolate block is the continental crust.
( I am also preparing another geometry with a bigger size because the continental part is too narrow and previously I had mesh quality issues


I have tried using (0,0,1) and I received this error :
RuntimeError: Error computing orientation of cell face. Cannot resolve tangential components into unambigious directions.
Up direction (0, 0, 1) cannot be parallel to the face normal (0, 0, 1).
If the face is horizontal, adjust the up_dir parameter.

I also tried to undefined the updir value but I got the same error.

Thank you in advance.

Alvina KK

This error usually shows up if either your fault surface is horizontal or nearly so or your has buried edges and you didn’t mark them. It looks like your along-strike fault direction is mostly in the y-direction, so using up_dir of (-0.2, 0, 1) will likely work (PyLith automatically normalizes it to a unit vector).

PyLith uses the up_dir direction to define the orientation of the shear traction components. These are along_strike = up x fault_normal and up_dip = normal x along_strike. This means you up_dir direction cannot be parallel to the fault_normal direction and up_dir should be set so that the along_strike direction is consistent across the fault surface.

Dear Brad,

I changed the up_dir value with -0.2,0,1 but still get the same error. It seems the system still using 0,0,1. I tried to run it again and it was failed. But there is no explanation for the error. (I attached the JSON file below). (14.5 KB)
Could you please help me to solve this?

Thank you.

I see up_dir set to [-0.2, 0, 1] for fault_slabbot but the default value is used for fault_slaptop. My guess is that either the error is coming just from fault_slabtop or it arises for both faults. In any case, specifying the up_dir for each of them to [-0.2, 0, 1] will likely resolve the problem.