@@ -350,6 +350,10 @@ def fracture_params(self) -> dict:
350350 - major_axis_angles: Major axis angles of the fractures (default [0.0, 0.0])
351351 - num_points: Number of points to define each fracture (default [10, 10])
352352
353+ The fracture axes are scaled by the minimum of the domain sizes. For adjusting
354+ the fracture centers, the user should override the property
355+ :meth:`fracture_centers`.
356+
353357 Returns:
354358 A dictionary with fracture parameters.
355359
@@ -362,23 +366,27 @@ def fracture_params(self) -> dict:
362366 "dip_angles" : np .array ([np .pi / 2 , np .pi / 2 ]),
363367 "major_axis_angles" : np .array ([0.0 , 0.0 ]),
364368 }
365- # Update with user-provided parameters, converting units as needed.
366- units = ["-" , "-" , "m" , "rad" , "rad" , "rad" ]
367- user_params = self .params .get ("fracture_params" , {})
368- for key , unit in zip (default_params .keys (), units ):
369- if key in user_params :
370- if unit == "m" :
371- default_params [key ] = self .units .convert_units (
372- user_params [key ], "m"
373- )
374- else :
375- default_params [key ] = user_params [key ]
369+
376370 if "fracture_minor_axes" not in default_params :
377371 default_params ["fracture_minor_axes" ] = default_params [
378372 "fracture_major_axes"
379373 ]
380374 return default_params
381375
376+ @property
377+ def fracture_minor_axes (self ) -> np .ndarray :
378+ params = self .fracture_params ()
379+ # Scale minor axes by the minimum domain size.
380+ size = min (self .domain_sizes ())
381+ return params ["fracture_minor_axes" ] * size
382+
383+ @property
384+ def fracture_major_axes (self ) -> np .ndarray :
385+ params = self .fracture_params ()
386+ # Scale major axes by the minimum domain size.
387+ size = min (self .domain_sizes ())
388+ return params ["fracture_major_axes" ] * size
389+
382390 @property
383391 def fracture_centers (self ) -> tuple [np .ndarray , np .ndarray ]:
384392 dx , dy , dz = self .domain_sizes ()
@@ -387,16 +395,17 @@ def fracture_centers(self) -> tuple[np.ndarray, np.ndarray]:
387395 return center_1 , center_2
388396
389397 def set_fractures (self ):
390- """Set the two elliptic fractures."""
398+ """Set the elliptic fractures as defined in the fracture parameters and the
399+ fracture centers method."""
391400 self ._fractures = []
392401 params = self .fracture_params ()
393402 for i in range (params ["num_fractures" ]):
394403 f = pp .create_elliptic_fracture (
395404 center = self .fracture_centers [i ],
396405 strike_angle = params ["strike_angles" ][i ],
397406 dip_angle = params ["dip_angles" ][i ],
398- major_axis = params [ " fracture_major_axes" ] [i ],
399- minor_axis = params [ " fracture_minor_axes" ] [i ],
407+ major_axis = self . fracture_major_axes [i ],
408+ minor_axis = self . fracture_minor_axes [i ],
400409 major_axis_angle = params ["major_axis_angles" ][i ],
401410 num_points = params ["num_points" ][i ],
402411 )
0 commit comments