-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Number of mesh elements #81
Comments
Because the code uses an FFT (Fast Fourier Transform) that requires the length of an array to be a power of 2. |
Just to unpack this expression (
A shorter way of writing this would be: |
Thank you! But why the assessment of number of desired mesh elements is resolution * L / Lb ? And could you please advice me some (your)article where is the exact physical set up of the problem(1d or 2d) with the same parameters? Thanks a lot! |
Because we define "resolution" as the desired number of elements per Lb length, that is, the value of the ratio Lb/dx = Lb/(L/N). In addition to this, we need N to be a power of 2. |
Removing all the clutter from the example notebook, we have: Lasp = 7 # Length of asperity / nucleation length
L = 5 # Length of fault / asperity length
ab_ratio = 0.8 # a/b of asperity
cab_ratio = 1 - ab_ratio
resolution = 7 # Mesh resolution / process zone width
# Compute relevant length scales:
# Process zone width [m]
Lb = set_dict["MU"] * set_dict["SET_DICT_RSF"]["DC"] / (set_dict["SET_DICT_RSF"]["B"] * set_dict["SIGMA"])
# Nucleation length [m]
Lc = Lb / cab_ratio
# Length of asperity [m]
Lasp *= Lc
# Fault length [m]
L *= Lasp
# Find next power of two for number of mesh elements
N = int(np.power(2, np.ceil(np.log2(resolution * L / Lb)))) First, the length scales are defined relative to the nucleation length. The asperity length is defined as 7 times the nucleation length, which allows for fast earthquake ruptures. If the asperity size were to be close to 1, only slow-slip events would develop, and below 1 it would show stable creep. This nucleation length is computed as To ensure numerical stability, the mesh size needs to be smaller than There is actually a "typo" in the Jupyter notebook, describing |
Hi Team,
why is number of mesh elements N:
Find next power of two for number of mesh elements
N = int(np.power(2, np.ceil(np.log2(resolution * L / Lb)))) ?
Where is equation for it?
Thank you!
The text was updated successfully, but these errors were encountered: