bessagroup / rvesimulator

Automated representative volume element simulator via abaqus for material constitutive law discovery
https://bessagroup.github.io/rvesimulator/
MIT License
14 stars 2 forks source link

Suggestion: Move this static method out of the class #76

Open mpvanderschelling opened 10 months ago

mpvanderschelling commented 10 months ago

Problem

Move this static method out of the class and make it a module-level function. This will make it easier to test and reuse.

Proposed solution

def fiber_volume(radius: float) -> float:
    """calculate the fiber volume of the current fiber

    Parameters
    ----------
    radius : float
        radius

    Returns
    -------
    vol:float
        volume of current fiber(disk)
    """
    return (4 / 3) * np.pi * radius**3

Assignees: Labels:

https://github.com/bessagroup/rvesimulator/blob/ea31752a6da3131cfe55027895ac23ddf684f3de/src/rvesimulator/microstructure/shpere_particles.py#L366-L380