CircularPatch
CircularPatch
CircularPatch(material: Union[int, str, Material], num_subdiv_circ: int, num_subdiv_rad: int, y_center: float, z_center: float, int_rad: float, ext_rad: float, start_ang: Optional[float] = 0.0, end_ang: Optional[float] = 360.0)
Bases: PatchBase
Circular patch for fiber sections.
This class defines a circular or arc-shaped region in a fiber section. The region is discretized into fibers using polar subdivisions.
Tcl form
patch circ <matTag> <numSubdivCirc> <numSubdivRad> <yCenter> <zCenter> <intRad> <extRad> <startAng> <endAng>
Attributes:
| Name | Type | Description |
|---|---|---|
num_subdiv_circ |
Number of subdivisions in the circumferential direction. |
|
num_subdiv_rad |
Number of subdivisions in the radial direction. |
|
y_center |
Local y-coordinate of the center point. |
|
z_center |
Local z-coordinate of the center point. |
|
int_rad |
Inner radius (0.0 for solid circular patch). |
|
ext_rad |
Outer radius. |
|
start_ang |
Starting angle in degrees. |
|
end_ang |
Ending angle in degrees. |
Example
from femora.core.model import Model
import femora.components.section.fiber # noqa: F401
model = Model()
mat = model.material.uniaxial.elastic(user_name="Core", E=3600.0)
section = model.section.fiber.section(user_name="CircPatchSection")
section.add_circular_patch(
material=mat,
num_subdiv_circ=8,
num_subdiv_rad=4,
y_center=0.0,
z_center=0.0,
int_rad=0.0,
ext_rad=10.0,
)
print(section.tag)
Create a CircularPatch with validated geometry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
material
|
Union[int, str, Material]
|
Uniaxial material reference (object, tag, or name). |
required |
num_subdiv_circ
|
int
|
Subdivisions around the circle. |
required |
num_subdiv_rad
|
int
|
Subdivisions along the radius. |
required |
y_center
|
float
|
Y-coordinate of center. |
required |
z_center
|
float
|
Z-coordinate of center. |
required |
int_rad
|
float
|
Inner radius. |
required |
ext_rad
|
float
|
Outer radius. |
required |
start_ang
|
Optional[float]
|
Optional starting angle in degrees (default 0.0). |
0.0
|
end_ang
|
Optional[float]
|
Optional ending angle in degrees (default 360.0). |
360.0
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If parameters are not numeric, if counts/radii are non-positive/negative, or if angles are inconsistent. |
Methods:
estimate_fiber_count
Calculate the total number of fibers in this patch.
Returns:
| Type | Description |
|---|---|
int
|
Total fiber count. |