File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed
Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change 2424from base import SpecificOutput
2525
2626
27- class OperKolmoLaw :
28- """Conversion from cartesian coordinates system to cylindrical, radial and spherical coordinate system"""
29-
30- def __init__ (self , X , Y , Z ):
31- self .X = X
32- self .Y = Y
33- self .Z = Z
34-
35- def compute_cylindrical_components (self ):
36- self .rh = np .sqrt (self .X ** 2 + self .Y ** 2 )
37- self .rt = np .atan2 (self .Y , self .X ) # rtheta, defined between [-pi; pi] and is 0 for x = y = 0
38- self .rv = self .Z
39- return self .rh , self .rt , self .rv
40-
41- def compute_radial_component (self ):
42- self .r = np .sqrt (self .X ** 2 + self .Y ** 2 + self .Z ** 2 )
43- return self .r
44-
45- def compute_spherical_component (self ):
46- self .r = self .compute_radial_component ()
47- self .rts = np .atan2 (self .Y , self .X ) # rtheta spherical, defined between [-pi; pi] and is 0 for x = y = 0
48- self .rp = np .acos (self .Z / self .r ) # rphi, defined between [0; pi]
49- return self .r , self .rts , self .rp
50-
51-
52-
5327class KolmoLaw (SpecificOutput ):
5428 r"""Kolmogorov law 3d.
5529
You can’t perform that action at this time.
0 commit comments