Umrechnung alpha, Näherungslösung GHA 1
This commit is contained in:
@@ -173,6 +173,17 @@ class EllipsoidTriaxial:
|
||||
y / ((1 - self.ee ** 2) * sqrtH),
|
||||
z / ((1 - self.ex ** 2) * sqrtH)])
|
||||
|
||||
def func_t12(self, x, y, z):
|
||||
c1 = x ** 2 + y ** 2 + z ** 2 - (self.ax ** 2 + self.ay ** 2 + self.b ** 2)
|
||||
c0 = (self.ax ** 2 * self.ay ** 2 + self.ax ** 2 * self.b ** 2 + self.ay ** 2 * self.b ** 2 -
|
||||
(self.ay ** 2 + self.b ** 2) * x ** 2 - (self.ax ** 2 + self.b ** 2) * y ** 2 - (
|
||||
self.ax ** 2 + self.ay ** 2) * z ** 2)
|
||||
t2 = (-c1 + sqrt(c1 ** 2 - 4 * c0)) / 2
|
||||
if t2 == 0:
|
||||
t2 = 1e-18
|
||||
t1 = c0 / t2
|
||||
return t1, t2
|
||||
|
||||
def ellu2cart(self, beta: float, lamb: float, u: float) -> np.ndarray:
|
||||
"""
|
||||
Panou 2014 12ff.
|
||||
@@ -360,14 +371,7 @@ class EllipsoidTriaxial:
|
||||
|
||||
# ---- Allgemeiner Fall -----
|
||||
|
||||
c1 = x ** 2 + y ** 2 + z ** 2 - (self.ax ** 2 + self.ay ** 2 + self.b ** 2)
|
||||
c0 = (self.ax ** 2 * self.ay ** 2 + self.ax ** 2 * self.b ** 2 + self.ay ** 2 * self.b ** 2 -
|
||||
(self.ay ** 2 + self.b ** 2) * x ** 2 - (self.ax ** 2 + self.b ** 2) * y ** 2 - (
|
||||
self.ax ** 2 + self.ay ** 2) * z ** 2)
|
||||
t2 = (-c1 + sqrt(c1 ** 2 - 4 * c0)) / 2
|
||||
if t2 == 0:
|
||||
t2 = 1e-14
|
||||
t1 = c0 / t2
|
||||
t1, t2 = self.func_t12(x, y, z)
|
||||
|
||||
num_beta = max(t1 - self.b ** 2, 0)
|
||||
den_beta = max(self.ay ** 2 - t1, 0)
|
||||
|
||||
Reference in New Issue
Block a user