DOI: 10.5061/dryad.t1g1jwtf1
title: A multiscale optimization framework for bone remodeling: Integrating material and structural adaptations across hierarchical scales

description: Bone exhibits a hierarchical organization across multiple length scales,
 integrating functional properties through adaptive remodeling mechanisms.
 In this article, we present a concurrent material-structure optimization
 framework that identifies optimal macroscale bone density and
 microstructural configurations, including collagen and hydroxyapatite
 distribution and lacunae orientation, across the length scales in bone’s
 hierarchical organization. Our framework formulates a compliance
 minimization problem with coupled material and structure optimization
 sub-problems and leverages a continuum micromechanics-based homogenization
 approach to efficiently capture bone’s hierarchical material behavior.
 This enables computationally tractable optimization independent of the
 number of hierarchical scales, addressing key limitations of conventional
 remodeling approaches. We apply the framework to a human proximal femur
 under realistic musculoskeletal loading conditions and demonstrate its
 ability to capture self-optimizing mechanisms consistent with
 physiological adaptation. While not intended as a clinical diagnostic tool
 at this stage, the model provides a physics-based rationale for estimating
 microstructural distributions of bone constituents and highlights
 deviations that may inform future assessments of bone quality. These
 findings offer a foundation for targeted therapeutic strategies,
 personalized diagnostics, and regenerative medicine applications.
description: # Bone Multi-Topology Optimization Dataset ## File: `bone_multitopopt.zip`
 ### Overview This dataset contains computational code and results from
 bone multi-scale optimization simulations for bone materials to carry out
 bone remodeling in Python.\ The research investigates a concurrent
 material–structure optimization framework that identifies optimal
 macroscale bone density and microstructural configurations, including
 collagen and hydroxyapatite distribution and lacunae orientation, across
 the hierarchical length scales of bone. --- ### Repository Structure ```
 bone_multitopopt/ ├── src/ # Main source code │ ├── __init__.py │ ├──
 bone_assembly_util.py # Finite element assembly utilities │ ├──
 bone_element_util.py # Element-level estimation operations │ ├──
 bone_material_optim_util.py # Material-level optimization algorithms │ ├──
 bone_micro_util.py # Continuum micromechanics-based homogenization
 utilities │ ├── bone_struct_optim_util.py # Structure-level topology
 optimization routine │ ├── fem_util.py # Finite Element Method (FEM) core
 module │ ├── input_file.py # Input parameter handling │ ├── tensor_util.py
 # Tensor operations │ ├── visual_SIMP.py # SIMP visualization │ └──
 visualization.py # General plotting utilities ├── test/ # Comprehensive
 test suite │ ├── __init__.py │ ├── test_FEM_solver.py # FEM solver
 validation tests │ ├── test_bone_assembly.py # Assembly utility tests │
 ├── test_bone_element.py # Element operation tests │ ├──
 test_bone_material_optim.py # Material optimization tests │ ├──
 test_bone_micro.py # Microstructure tests │ ├── test_fem_util.py # FEM
 utility tests │ └── test_input_file.py # Input handling tests ├──
 Examples/ │ └── Examples_paper/ │ └── Multiscale_bone/ # Paper
 reproduction case study │ ├── input_file.py # Multiscale simulation
 configuration │ ├── main.py # Main script for multiscale optimization │
 ├── Combined_BC.mat # Boundary condition data (CT scan-based) │ ├──
 squared_mesh_data.mat # Mesh geometry data (CT scan-based) │ └── pictures/
 # Simulation result visualizations (collagen, HA, density, orientation) │
 └── bone_sub_theta_all-itr/ # Iteration-wise lacunae orientation
 visualization data │ ├── theta_0.png # Lacunae orientation vector field at
 iteration 0 │ ├── theta_5.png # Lacunae orientation vector field at
 iteration 5 │ ├── theta_10.png # Lacunae orientation vector field at
 iteration 10 │ ├── theta_15.png # Lacunae orientation vector field at
 iteration 15 │ ├── theta_20.png # Lacunae orientation vector field at
 iteration 20 │ ├── theta_25.png # Lacunae orientation vector field at
 iteration 25 │ ├── theta_30.png # Lacunae orientation vector field at
 iteration 30 │ ├── theta_final.png # Final converged lacunae orientation
 vector field │ ├── bone_sub_theta_all-itr.xdmf # Descriptor file linking
 iteration-wise orientation data for visualization │ └──
 bone_sub_theta_all-itr.h5 # HDF5 data file containing all iteration-wise
 orientation field values ├── images/ # Supporting figures for conceptual
 and graphical illustrations │ ├── bone_opt.png # Conceptual sketch of the
 proposed material and structure optimization problem for a proximal femur
 ├── setup.py — A standard Python packaging script used to define the
 project structure. It allows the src directory to be recognized as an
 installable Python package using setup tools ``` --- ### Software
 Requirements **Essential Software:** * **Python 3.7+** with dependencies:
 NumPy, SciPy, Matplotlib, Jupyter To install all dependencies: ```bash
 python setup.py install ``` **File-Specific Instructions:** * Run Python
 scripts: `python main.py` * Launch Jupyter notebook: `jupyter notebook
 bone_multitopopt.ipynb` * View PNG images: any standard image viewer
 **Simulation Results Visualization:** *
 [ParaView](https://www.paraview.org/) — Free visualization of `.xdmf`
 result files (Each .xdmf file is accompanied by a corresponding .h5 (HDF5)
 file that stores the actual numerical data (mesh, fields, and solution
 variables). The .xdmf file serves as a lightweight descriptor that
 references the .h5 data for efficient visualization in ParaView.) --- ###
 Data Files Description #### Optimization Results —
 `Examples/Examples_paper/Multiscale_bone/pictures/` **Files:** *
 `f_HA_itr_(iteration).png` — Optimized hydroxyapatite (mineral) fraction
 per iteration * `f_col_itr_(iteration).png` — Optimized collagen fraction
 per iteration * `rho_itr_(iteration).png` — Optimized density distribution
 per iteration * bone_sub_theta_all-itr/`theta_(iteration).png` — Optimized
 microstructural orientation angle per iteration *
 `vertical_slice_mirrored_70.png` — 70th vertical slice of the femur
 extracted from the CT dataset, represented by Hounsfield Unit (HU) map
 **Model Parameters:** * Design domain: Segmented bone geometry
 (`inp.Bone()`) * Total elements: Computed from mesh (`n_ele =
 elem.shape[0]`) * Estimated total volume: 5860.3385 (arbitrary unit³) *
 Element volume: `vol_el = vol_dom / n_ele` * Initial element density: ρ =
 0.75 (uniform initialization) * Target volume fraction: 0.65 (material
 utilization ratio) * Filter radius: 2 (element units) * Optimization
 iterations: 30 * Move limit (density update step): 0.02 * Damping
 coefficient: 0.5 (stabilization) * Tolerance (micro-iteration
 convergence): 1×10⁻² * Maximum micro-iterations: 7 * Initial
 microstructural parameters: * `f_HA_bar = 0.55` — initial hydroxyapatite
 fraction * `f_col_bar = 0.45 × 0.9` — initial collagen fraction * `θ_lac =
 0` — initial microstructural orientation --- ## File:
 `BoneHealthAssessment.zip` ### Overview This clinical dataset contains CT
 scans for quantitative bone health assessment in two female patients of
 different ages, demonstrating the application of the bone multi-topology
 optimization framework to patient-specific data. ``` BoneHealthAssessment/
 ├── Pat064_58F/ # Patient 064: 58-year-old female │ ├──
 Pat064_CT_Data.nrrd # 3D CT scan volume │ ├── Pat064_Slice2D.nrrd #
 Extracted 2D slice │ ├── bone_material-optimization2D-HA.xdmf # Optimized
 mineral density │ ├── bone_material-optimization2D-rho.xdmf # Optimized
 macro density │ └── Pat064_Slice2D.png # 2D slice visualization └──
 Pat095_82F/ # Patient 095: 82-year-old female ├── Pat095_CT_Data.nrrd # 3D
 CT scan volume ├── Pat095_Slice2D.nrrd # Extracted 2D slice ├──
 bone_material-optimization2D-HA.xdmf # Optimized mineral density ├──
 bone_material-optimization2D-rho.xdmf # Optimized macro density └──
 Pat095_Slice2D.png # 2D slice visualization ``` --- ### Software
 Requirements **Medical Imaging Tools:** * [3D
 Slicer](https://www.slicer.org/) — Free visualization of `.nrrd` data *
 [ITK-SNAP](http://www.itksnap.org/) — Free medical image segmentation
 **Simulation Results Visualization:** *
 [ParaView](https://www.paraview.org/) — Free visualization of `.xdmf`
 result files (Each .xdmf file is accompanied by a corresponding .h5 (HDF5)
 file that stores the actual numerical data (mesh, fields, and solution
 variables). The .xdmf file serves as a lightweight descriptor that
 references the .h5 data for efficient visualization in ParaView.) --- ##
 Citation If you use this dataset or code, please cite the associated
 research and this repository. --- ## License This repository and its
 accompanying datasets are released under the **Creative Commons Zero (CC0
 1.0 Universal Public Domain Dedication)**. By applying CC0, the author
 waives all rights to the data and associated materials to the extent
 permitted by law, allowing unrestricted reuse, distribution, and
 modification without any requirement for attribution. All code components
 within this repository are likewise made openly available for academic and
 non-commercial use under the same CC0 waiver, ensuring full transparency
 and reproducibility of the presented research.