1. Introduction
Additive Manufacturing (AM) has fundamentally transformed modern manufacturing by enabling rapid prototyping and the fabrication of geometrically intricate structures that are difficult or impossible to achieve through conventional methods [
1,
2]. Among various AM technologies, Selective Laser Sintering (SLS) has emerged as a particularly prominent technique due to its ability to produce durable components directly from powdered materials. The SLS process offers significant advantages, including design flexibility, reduced material waste, and rapid production capabilities, which makes it attractive for aerospace, automotive, biomedical, and consumer product applications [
3].
Despite these advantages, the sophisticated thermal processes inherent in SLS, characterized by localized heating, steep thermal gradients, and rapid cooling, introduce major challenges. These include the generation of residual stresses, distortions, and dimensional deviations that can compromise the structural integrity, reliability, and functionality of manufactured parts [
4,
5]. The complex interplay of thermal gradients, material properties, and process parameters creates a challenging optimization problem that requires advanced predictive tools to address.
Numerical simulation has emerged as a powerful approach to analyze and optimize AM processes by providing insight into heat transfer, phase transformations, and mechanical deformation, thus reducing the need for costly empirical testing [
6,
7]. However, the adoption of such advanced simulation methods is often constrained by the prohibitive cost of commercial software and the specialized hardware it requires, which limits the accessibility for academic institutions, researchers, and small to medium-sized enterprises (SMEs).
To address these challenges, this paper presents OpenAM-SimCCX, a comprehensive and cost-effective workflow for thermo-mechanical simulation of selective laser sintering (SLS) processes using the open-source finite element solver CalculiX. The proposed methodology couples a time-dependent thermo-mechanical model with advanced modeling features, including Gaussian heat source representation, layer-by-layer element activation, and temperature-dependent material properties [
8,
9,
10,
11]. This integrated framework enables accurate prediction of deformation and provides valuable insights into final part quality.
To ensure reliability, the proposed workflow is compared with reference cases from the established literature, with systematic evaluations of scanning strategies, deformation patterns, and residual stress distributions. By combining predictive accuracy with computational efficiency, OpenAM-SimCCX offers capabilities comparable to commercial solutions while remaining fully accessible as an open-source framework.
Finally, recognizing the importance of community-driven development, this research provides extensive documentation, preprocessing scripts, material property databases, and open-source repositories. These resources are designed to facilitate reproducibility, encourage collaboration, and promote the broader adoption of AM simulation practices within both the academic and industrial communities.
2. Literature Review
This literature review commences by exploring various simulation approaches and their applications in additive manufacturing.
2.1. Simulation Approaches in Additive Manufacturing
Numerical simulation has become a cornerstone in analyzing and optimizing metal Additive Manufacturing (AM) processes, particularly Laser Powder Bed Fusion (LPBF). These processes are governed by intense, localized thermal cycling that produces steep thermal gradients, residual stresses, and geometric distortions, which directly impact part quality and performance. Traditional analytical approaches are insufficient to capture such multiphysics phenomena, making simulation indispensable.
Finite Element Analysis (FEA) has emerged as the dominant methodology for modeling thermo-mechanical behavior in AM. Modern FEA-based approaches typically employ a sequentially coupled scheme: first, transient heat transfer is modeled to establish the thermal history; subsequently, the resulting temperature fields are used to drive mechanical stress and deformation analysis [
8]. This coupling strategy balances computational efficiency with physical fidelity, enabling the simulation of layer-by-layer manufacturing over complex geometries.
Recent studies have demonstrated the effectiveness of this approach. For instance, Poyraz et al. [
12] employed Simufact Additive to predict residual stresses in LPBF-fabricated Inconel 625 parts, showing the importance of accurate material data and realistic boundary conditions in achieving reliable predictions. Commercial tools such as ABAQUS and Simufact Additive remain widely adopted due to their robust solvers and pre-integrated AM modules. ABAQUS, for example, has supported multi-scale thermo-mechanical simulations through progressive element activation and user subroutines, as demonstrated by Balbaa and Elbestawi [
13] and Yang et al. [
14]. Simufact Additive further facilitates voxel-based meshing, inherent strain modeling, and includes material databases tailored for LPBF applications.
Despite their strengths, commercial software often functions as a black box, limiting transparency and user control. In contrast, custom solvers such as AdhoC++ 2022 an in-house finite element framework continuously developed and maintained at the Technical University of Munich (TUM) [
15] provide full flexibility for implementing bespoke heat transfer and material behavior models, though at the cost of significant programming effort and extensive validation. Open-source alternatives such as CalculiX [
11] strike a practical balance: while lacking dedicated AM modules and advanced GUIs, CalculiX offers extensibility via user subroutines and Python based preprocessing/postprocessing workflows. These capabilities allow researchers to model phenomena such as evolving porosity, temperature-driven phase transformations, and path-dependent scanning strategies in a cost-effective manner.
To address the computational expense of high-fidelity AM simulations, advanced strategies have been introduced. Huang et al. [
16] developed a GPU-accelerated explicit FEA framework that grouped tracks and layers, achieving more than 50-fold speedup compared to conventional ABAQUS implementations, while maintaining predictive accuracy for residual stress and distortion.
In summary, simulation approaches in AM have evolved from basic thermo-mechanical models to advanced, customizable frameworks that balance accuracy, efficiency, and accessibility. While commercial software remains dominant in industrial practice, open-source platforms such as CalculiX increasingly provide powerful, transparent, and economically viable alternatives for researchers and SMEs.
2.2. Limitations of Commercial Tools
Commercial FEA software, including ABAQUS, Simufact Additive, Amphyon, and Netfabb, offers advanced capabilities for simulating Additive Manufacturing (AM) processes. These platforms provide robust numerical solvers, pre-integrated AM modules, and extensive material libraries, enabling complex multi-physics simulations. However, several limitations constrain their utility, particularly in research, exploratory studies, and resource-constrained environments.
The primary concern is the internal numerical formulations. As noted by Poyraz et al. [
12], commercial platforms often obscure critical assumptions regarding heat input, material interpolation, and solver stabilization. This opacity complicates rigorous model validation, limits reproducibility, and restricts the extension to non-standard materials or novel physical effects. Furthermore, many commercial tools rely on the inherent strain method for residual stress prediction, which, while computationally efficient, exhibits limited generalizability. Bugatti and Semeraro [
17] demonstrated that this approach is accurate only when carefully calibrated for specific geometries, and its extrapolation to new configurations can introduce significant errors. Important time-dependent phenomena, such as stress relaxation and creep, are frequently neglected, reducing accuracy for components with complex thermal histories [
18].
The customization limitations of commercial platforms further impede advanced research. Although user-defined subroutines (e.g., UMAT, DFLUX, HETVAL) are supported, access to core solver functionality remains restricted. Researchers, such as Yang et al. [
14] and Balbaa and Elbestawi [
13], have had to implement extensive preprocessing and scripting workflows to simulate realistic laser scanning patterns and material activation sequences, highlighting the limited flexibility and control available to users.
Computational cost is another critical constraint. Implicit solvers, commonly used in commercial software, can become prohibitively slow for high-resolution or large-scale models. Huang et al. [
16] addressed this by developing a GPU-based explicit solver, which significantly accelerated computations without sacrificing predictive accuracy. Beyond computational demands, the high licensing costs of commercial platforms restrict accessibility for academic institutions, small enterprises, and budget-constrained research groups. Many commercial tools also lack integrated optimization capabilities, such as automated build orientation or support structure design, requiring users to develop their own routines [
19].
In summary, while commercial FEA software provides powerful tools for AM simulation, these platforms face challenges related to transparency, flexibility, computational efficiency, and cost. These limitations underscore the need for alternative frameworks particularly open-source solutions that enable detailed, customizable, and cost-effective modeling of AM processes for research and industrial applications.
2.3. Open-Source Alternatives and the Role of CalculiX
Open-source finite element platforms provide a viable alternative to commercial tools, particularly for research applications requiring full control over the solver logic, process customization, and methodological transparency. Among these platforms, CalculiX has emerged as a promising solution due to its extensibility, robust numerical foundation, and support for user-defined subroutines, allowing researchers to implement advanced material models, specialized boundary conditions, and custom heat source formulations.
Silva et al. [
20] demonstrated the capabilities of CalculiX in simulating Selective Laser Sintering (SLS) for Inconel 625. Their study incorporated a Gaussian heat source and porosity evolution, predicting peak residual stresses of 230 MPa and part distortions up to 0.027 mm. Although experimental validation was not conducted, the results highlighted the feasibility of advanced material modeling within an open-source framework and underscored the potential of CalculiX for high-fidelity AM simulations.
Building on this foundation, Goetz et al. [
21] developed AscentAM, a modular simulation framework based on CalculiX. The framework supports sequential thermo-mechanical analysis, layer-wise material activation, comprehensive process chain modeling, and uncertainty quantification. Validation against high-resolution 3D scan data demonstrated dimensional accuracies up to 94.7% and average geometric deviations below 0.2 mm, confirming the industrial applicability of open-source FEA workflows.
Additionally, Dreibati [
11] illustrated the flexibility of CalculiX implementing layer-by-layer simulation strategies. This methodology accurately models the SLS process, including powder spreading, laser beam trajectory, and element activation sequences, enabling detailed analysis of temperature evolution while maintaining computational efficiency via selective mesh refinement and element activation.
Collectively, these studies show that with careful extensions, validation, and methodological rigor, CalculiX can serve as a robust and cost-effective platform for high-fidelity AM simulations. Its open-source nature provides a transparent and flexible alternative to commercial software, empowering researchers and small enterprises to explore novel material models, complex heat transfer effects, and advanced process simulations that would be challenging to achieve in proprietary tools.
While open-source simulation environments have significantly improved the accessibility and transparency of additive manufacturing research, most traditional frameworks remain limited by CPU-bound computational performance. To address these constraints, recent efforts have focused on leveraging Graphics Processing Units (GPUs) to accelerate numerical solvers and enable high-fidelity, large-scale simulations. These emerging GPU-enhanced frameworks represent the next evolutionary step in open and extensible AM modeling platforms.
2.4. GPU-Accelerated and Open-Source Frameworks
Recent advancements in high-performance computing have driven the development of GPU-accelerated frameworks tailored for additive manufacturing (AM). These frameworks significantly reduce simulation times while maintaining high fidelity in thermomechanical modeling. For instance, Huang et al. [
16] presented an open-source GPU-based solver optimized for layer-wise thermal field prediction, demonstrating near real-time computation capabilities compared to CPU-based alternatives. Similarly, Liao et al. [
22] developed a GPU-accelerated thermomechanical solver capable of accurately predicting residual stresses in metal AM parts, providing a foundation for multi-physics process modeling.
The emergence of specialized frameworks such as [
21] (AscentAM) and [
23] (AdhoC++) reflects a growing trend toward community-driven and modular simulation architectures. These tools integrate open-source numerical kernels with CUDA or HIP backends, allowing researchers to extend functionalities for specific AM modalities or materials without the constraints of proprietary software.
In parallel, Luthi et al. [
24] introduced MULTI-3, a GPU-enhanced meshfree simulation framework designed for multi-track, multi-layer, and multi-material laser powder bed fusion (LPBF) processes. The framework demonstrates scalability across multiple GPUs and captures the complex thermal interactions between overlapping melt pools. Collectively, these developments illustrate how open-source, GPU-accelerated solvers are reshaping the computational landscape of additive manufacturing research by balancing accuracy, scalability, and accessibility.
2.5. Experimental Validation and Realism
Despite the sophistication of contemporary thermo-mechanical simulation methods for metal additive manufacturing (AM), rigorous experimental validation remains essential to ensure predictive realism, establish model credibility, and build confidence in simulation-based design decisions. The inherent complexity of AM processes, involving coupled thermal, mechanical, and metallurgical phenomena, necessitates validation against high-fidelity experimental measurements to confirm the accuracy and reliability of simulation predictions.
Common validation techniques include X-ray diffraction (XRD) for residual stress measurement, high-resolution 3D optical scanning for geometric accuracy assessment, blind-hole drilling for localized stress evaluation, and advanced microscopy for microstructural characterization. These complementary methods enable comprehensive evaluation of simulation predictions across multiple scales and physical effects.
Recent studies have provided quantitative insights into the effectiveness of validation approaches. For example, Sikan et al. [
25] reported residual stress prediction deviations of up to 100 MPa via XRD measurements, highlighting areas where simulation models require refinement. Conversely, Singh et al. [
26] demonstrated improved agreement with experimental data, reporting stress prediction errors within 7% through careful calibration of material properties and boundary conditions.
Geometric accuracy has also been systematically assessed. Sikan et al. achieved high-fidelity distortion predictions with errors below 0.05 mm using ATOS 3D scanning systems. Similarly, Bayat et al. [
27] showed that refined thermal boundary condition modeling can reduce distortion prediction errors from 46.2% to 1.19%, emphasizing the critical importance of accurate physical modeling in achieving realistic simulation outcomes.
A key limitation remains: the majority of validated studies to date have relied on commercial FEA software platforms. Open-source solvers, such as CalculiX, have not yet undergone systematic experimental validation, which limits their adoption in high-fidelity AM research and industrial applications. Addressing this gap represents an important priority for future studies, enabling open-source tools to achieve the same credibility and predictive power as commercial alternatives.
In summary, experimental validation is indispensable for confirming simulation fidelity in AM, providing the necessary foundation for both academic research and industrial process optimization.
2.6. Scan Strategies and Their Effects
Scan strategy is a critical process parameter in powder bed fusion (PBF) additive manufacturing, directly influencing thermal gradients, residual stress distributions, microstructural evolution, and final part distortion. Both experimental and computational studies consistently show that careful planning of scan paths can significantly affect stress anisotropy, melt pool stability, and geometric accuracy of fabricated components.
Alternating and rotational scanning strategies, such as interlayer hatch rotations of
,
, and
, have been shown to reduce residual stresses and improve part quality. Paraschiv et al. [
28] demonstrated that
chessboard and strip scanning patterns decreased post-processing distortion by 39–63%. Similarly, Monu et al. [
29] reported reductions in normalized von Mises stress from 0.84 to 0.13 using bidirectional and rotational scanning strategies.
Inclined scanning strategies, for example
hatching, also improve heat distribution and control stress accumulation. Cheng et al. [
30] observed reduced build-direction warping in samples using
scanning patterns. Zhang et al. [
31] and Carraturo et al. [
15] reported enhanced residual stress uniformity and melt pool stability in AlSi10Mg and IN625, respectively, under inclined scanning approaches.
Advanced scanning strategies, including dual-laser time-delayed scanning [
32] and subdivided hatching [
27], have further improved simulation fidelity and predictive accuracy. Flash heating techniques, in particular, have been shown to reduce distortion error from 46.2% to 1.19%, as verified through high-resolution 3D scanning.
Despite these advancements, most scan strategy simulations are implemented using commercial software, limiting accessibility for experimental and exploratory research. Open-source platforms, such as CalculiX, remain underutilized, though they offer substantial potential for custom scan path modeling, advanced analyses, and broader dissemination within the research community.
In summary, optimized scan strategies are pivotal in controlling thermal and mechanical phenomena during PBF, directly impacting residual stress, distortion, and part quality. The combination of experimental validation and advanced simulation enables both the refinement of scanning techniques and the development of robust, predictive models for additive manufacturing.
2.7. Summary and Research Gap
The literature on metal additive manufacturing (AM) highlights substantial progress in simulating residual stress and distortion, particularly through finite element analysis (FEA) in laser powder bed fusion (LPBF) processes. Commercial software platforms provide well-integrated AM modules and comprehensive material libraries, enabling robust simulation capabilities. However, these tools exhibit several notable limitations: they restrict solver customization, rely on simplified modeling approaches such as inherent strain methods, and require expensive licenses, which limits accessibility and reduces transparency and generalizability of the results.
Open-source solvers, such as CalculiX, offer distinct advantages in flexibility, extensibility, and cost-effectiveness. Emerging studies demonstrate their potential for accurate thermo-mechanical simulation of AM processes, including complex material behavior and sequential layer-wise modeling. Despite these advantages, open-source platforms remain under-validated, especially for simulations that incorporate realistic scanning strategies, material activation sequences, and practical boundary conditions.
A significant gap persists in the current research landscape: the absence of comprehensive, experimentally validated, open-source thermo-mechanical simulation workflows that integrate detailed scan path modeling, realistic material properties, and physically representative boundary conditions. Addressing this gap is critical for enabling high-fidelity AM simulations accessible to both the research and industrial communities.
This work directly addresses this gap by developing a CalculiX based simulation pipeline that enables sequential thermal and mechanical analysis using validated input parameters and realistic scanning strategies. The primary objectives of this research are to:
Provide a fully accessible, open-source framework for high-fidelity AM simulation.
Incorporate detailed scan path modeling and advanced material activation schemes.
Validate the simulation workflow against experimental data to ensure predictive realism.
By achieving these objectives, this research advances the state of metal AM simulation, offering a transparent, customizable, and experimentally grounded alternative to proprietary software. This framework lays the foundation for subsequent methodological development and practical application in additive manufacturing.
4. Open-Source Framework for Thermo-Mechanical Simulation of Layer-by-Layer Additive Manufacturing
This section presents a comprehensive open-source framework for simulating additive manufacturing (AM) processes in a layer-by-layer manner. The workflow integrates FreeCAD for geometry and trajectory definition, PrePoMax and gmsh for mesh generation and boundary condition assignment, CalculiX for coupled thermo–mechanical finite element analysis, and ParaView for post-processing and visualization. As illustrated in
Figure 1, the framework provides a cost-effective and reproducible methodology for predicting transient temperature fields, residual stresses, distortions, and related thermo–mechanical responses in processes such as directed energy deposition (DED) and powder bed fusion (PBF). By leveraging entirely open-source tools, the proposed approach enables high-fidelity simulations without reliance on proprietary software, making it broadly accessible to both researchers and practitioners.
4.1. CAD Modeling and Trajectory Definition Using FreeCAD
The workflow begins with geometry preparation in FreeCAD, an open-source parametric CAD platform. A custom-developed workbench extends FreeCAD’s slicing and path-planning capabilities, providing both manual and automated trajectory generation. The 3D model, including substrate and deposition geometry, can be imported or created directly within FreeCAD and is subsequently partitioned into layers of user-defined thickness (e.g., 5 mm). For each layer, scanning trajectories are generated either manually through edge selection and coordinate input, or automatically using algorithms that optimize raster, contour, or hybrid scan strategies.
Process parameters such as dwell time (e.g., 30 ms), hatch spacing, and scanning speed can be specified to reflect physical deposition conditions. The add-on estimates build time, material consumption, and energy requirements while optimizing deposition sequences for efficiency. Advanced features include multi-material support, variable layer thickness, support structure generation, and overhang detection. The framework also incorporates predictive tools for thermal distortion and geometric integrity, thereby enabling realistic layer-by-layer simulation of additive manufacturing processes.
As illustrated in
Figure 1, the workflow follows a structured sequence: (1) model import, (2) geometry slicing, (3) trajectory identification, (4) parameter assignment, and (5) tool motion simulation. This integrated CAD-to-trajectory pipeline provides a robust foundation for subsequent finite element analysis in the overall simulation framework.
4.2. Mesh Generation and Boundary Conditions Using Coreform Cubit or PrePoMax
The CAD geometry is meshed using either Coreform Cubit (script-driven, commercial with academic licensing), Gmsh or PrePoMax (open-source GUI for CalculiX). All platforms provide robust meshing capabilities suitable for additive manufacturing simulations, with Cubit offering advanced automation through scripting and PrePoMax enabling efficient GUI-based workflows.
Following best practices, the deposition region is discretized with hexahedral or tetrahedral elements, ensuring at least two elements per layer thickness to resolve steep thermal gradients. Mesh density is refined near the heat source, while block-based partitioning represents each deposited layer as an independent mesh block, enabling sequential activation during simulation. The layer activation strategy employs element “birth and death” techniques, where undeposited material is initially deactivated and progressively activated in accordance with the virtual heat source trajectory. This approach accurately captures transient thermal evolution and stress development.
Boundary conditions include substrate clamping to suppress rigid body motion, applied using the 3-2-1 technique to minimize over-constraint. Thermal boundary conditions incorporate both convective and radiative heat losses, along with initial temperature assignments. Temperature-dependent material properties, phase change phenomena, and localized heat-affected zone (HAZ) effects are incorporated where relevant to ensure realistic representation of the additive process.
4.3. Coupled Thermo–Mechanical Analysis Using CalculiX
The coupled thermo–mechanical simulations employ CalculiX, an open-source finite element solver, with input files generated through PrePoMax and Python scripts. Within CalculiX, the thermo-mechanical workflow is realized through four core user-defined Fortran subroutines that collectively define the physics of the coupled system:
weld_deposit.f,
dflux.f,
e_c3d_th.f, and
resultstherm.f. These subroutines enable accurate representation of heat input, material activation, element-level matrix assembly, and thermal flux recovery in AM processes.
Figure 2 illustrates the complete workflow and interactions between subroutines, while
Table 1 summarizes their roles. Detailed mathematical formulations, coordinate transformations, and complete code listings are provided in
Appendix A.10.
4.3.1. Element Activation and Material Deposition
The weld_deposit.f subroutine governs the sequential activation of elements to simulate progressive material deposition. This is achieved through a geometric activation criterion based on the predefined scan trajectory and process parameters, avoiding costly remeshing through the quiet element technique.
Activation Strategy
Elements are activated progressively as the heat source traverses the deposition path. The material state is controlled via an activation factor
assigned at each integration point:
The activation factor scales material properties (conductivity, density, stiffness) to enable smooth transition from powder to consolidated material states. Elements are activated when the heat source position, determined by
reaches their spatial location along the scan path, where
v is the scanning speed and
is the layer initiation time.
Physical Interpretation
This progressive activation mimics the physical deposition process: regions ahead of the laser remain inactive (powder), while deposited regions become fully active (consolidated material). The approach captures spatial and temporal characteristics of layer-by-layer manufacturing without remeshing, making it computationally efficient for multi-layer simulations. Complete details on trajectory generation algorithms, coordinate transformations, and raster scanning logic are provided in
Appendix A.
4.3.2. Heat Source Definition
The
dflux.f subroutine defines the volumetric heat input from the moving laser, capturing the localized nature of energy deposition through a conical Gaussian distribution:
where
combines laser power
P with absorption efficiency
, and
r is the radial distance from the beam centerline in the local coordinate system of the moving source.
Moving Heat Source Implementation
The heat source position and orientation update at each time step to follow the scan path. Global integration point coordinates are transformed to the heat source’s local coordinate system through rotation matrices, enabling accurate flux calculation as the laser traverses complex trajectories. The depth-dependent radius creates a conical heat source profile that realistically represents laser penetration into the powder bed.
Role in Thermo-Mechanical Coupling
The
dflux.f subroutine provides the driving thermal load that creates steep temperature gradients characteristic of laser-based AM. These thermal fields, when coupled with temperature-dependent material properties, generate the thermal strains that drive residual stress formation and part distortion. Detailed mathematical formulations for coordinate transformations (Equations (
A26)–(
A30) in
Appendix A) and orientation angle calculations ensure accurate heat input regardless of scan path complexity.
4.3.3. Element Matrix Assembly
The e_c3d_th.f subroutine forms the element-level matrices for both thermal and mechanical behavior, computing conductivity, capacitance, mechanical stiffness, and thermo-mechanical coupling contributions through numerical integration.
Coupled Element Equations
The partitioned matrix form for element
e is:
where
and
are mass and thermal capacity matrices,
and
are mechanical and thermal stiffness matrices,
represents thermo-mechanical coupling through thermal expansion, and
and
are mechanical and thermal load vectors.
Temperature-Dependent Integration
At each Gauss point, temperature-dependent material properties , , , , and are evaluated and integrated to form element contributions. The activation factor scales these properties for inactive elements, ensuring numerical stability during progressive material deposition. Element matrices are assembled via Gauss quadrature (2 × 2 × 2 integration rule for hexahedral elements) and summed into global system matrices.
Implementation Role
This subroutine provides the finite element contributions necessary for coupled thermo-mechanical analysis, enabling accurate representation of progressive deposition without remeshing. The thermal expansion term (
) directly couples temperature fields to mechanical displacements, capturing the physical mechanism by which thermal gradients generate residual stresses. Complete derivations of element integrals and quadrature implementations are provided in
Appendix A.10.
4.3.4. Thermal Results and State Variable Update
The resultstherm.f subroutine executes after each thermal increment to compute heat flux at integration points and update state variables governing material activation and temperature-dependent behavior.
Heat Flux Calculation
Heat fluxes are computed using Fourier’s law, with material properties scaled by the activation factor:
where the temperature gradient is obtained from nodal values via shape function derivatives. These fluxes enable post-processing visualization of thermal energy flow and validation against experimental thermography.
State Variable Management and Feedback
The subroutine maintains consistency across time increments by updating activation factors , temperature-dependent material properties, and element activation flags. Critically, for integration points that remain inactive (), resultstherm calls weld_deposit to evaluate whether activation should occur in the current increment based on updated time and heat source position. This feedback loop ensures synchronization between deposition logic and thermal response, maintaining physical consistency throughout the layer-by-layer build process.
Physical Significance
This subroutine bridges the thermal solution and the evolving material domain, providing derived quantities essential for both post-processing and time-stepping control. The activation feedback mechanism ensures that material deposition follows the physical laser trajectory, capturing the transient nature of additive manufacturing without requiring user intervention at each time step. Implementation details for gradient computation and convergence criteria are provided in
Appendix A.
4.3.5. Workflow Integration and Summary
Figure 2 illustrates the sequential execution of the four subroutines within each time step:
weld_deposit: Evaluates activation factors based on heat source position
dflux: Computes Gaussian heat flux
e_c3d_th: Assembles element matrices , , , incorporating heat input and activation
resultstherm: Recovers thermal fluxes, updates state variables, provides feedback to weld_deposit
Table 1 summarizes the primary roles and input/output relationships for each subroutine. This integrated workflow captures thermal gradients, melt pool evolution, and residual stress formation essential for predicting distortions and defects in additive manufacturing.
Computational Efficiency
The element activation strategy combined with adaptive time-stepping enables simulation of 167-layer builds with 400,000 elements in 2–8 h on standard workstations (8 cores, 64 GB RAM). The quiet element technique avoids remeshing overhead while the feedback loop between
resultstherm and
weld_deposit ensures physical consistency without manual intervention. Complete Fortran code listings, verification test cases, and implementation guidelines are available in
Appendix A.
4.4. Post-Processing and Visualization Using ParaView
Simulation results are exported in .frd format and converted (e.g., via ccx2paraview) into ParaView-compatible datasets, ensuring preservation of temporal information and layer identifiers. ParaView then serves as the primary platform for post-processing, enabling detailed thermo–mechanical visualization and analysis.
The post-processing workflow supports:
Thermal Field Analysis: Visualization of transient temperature contours, thermal gradients, and heat flux evolution throughout the build.
Mechanical Response: Mapping of displacement fields, stress and strain distributions, and residual stress assessment, with time-dependent deformation visualized using tools such as warp by vector.
Layer-Resolved Analysis: Examination of individual layers and cooling cycles with temporal controls to study cyclic thermal and mechanical behavior.
Build Sequence Visualization: Animations of sequential deposition for qualitative inspection of distortion accumulation and residual stress development.
Advanced visualization techniques such as clipping, slicing, and streamline generation enable interrogation of internal fields and localized features. Furthermore, Python 3.11.1 scripting (pvpython) facilitates automated batch post-processing, parametric studies, and reproducible report generation across multiple build scenarios.
4.5. Computational Considerations and Adaptability
The framework addresses key numerical challenges in thermo–mechanical simulation of additive manufacturing through a combination of temporal, spatial, and material modeling strategies.
Temporal Discretization: Adaptive time stepping is employed to balance accuracy and efficiency. Fine increments are used during active deposition, where rapid thermal transients dominate, while larger steps are adopted during cooling phases governed by slower mechanical relaxation. This strategy reconciles the disparity between thermal and mechanical time scales.
Spatial Resolution: Local mesh refinement is applied in heat-affected regions to resolve steep gradients, while coarser elements are used in less critical zones, ensuring both accuracy and computational efficiency.
Material Modeling: Temperature-dependent constitutive models incorporate thermal conductivity, specific heat, density, elastic modulus, yield strength, and thermal expansion coefficient. Where applicable, phase transformations and microstructure-dependent behavior are included to enhance physical fidelity.
Validation and Verification: Predictive accuracy is ensured through comparison with experimental thermal histories and dimensional measurements. This step provides confidence in the framework’s applicability to diverse AM processes, including powder bed fusion and directed energy deposition.
The modular architecture enables integration of advanced heat source models, customized material laws, and multi-material deposition strategies. This adaptability makes the framework suitable for process optimization, residual stress mitigation, and quality assurance across a broad spectrum of additive manufacturing technologies.
By combining open-source tools, this framework offers an accessible yet high-fidelity platform for AM simulation. It enables researchers to capture the thermo–mechanical complexities of layer-wise deposition, providing valuable insights for process optimization, defect mitigation, and distortion control.
5. Experimental Results and Discussion
5.1. Simulation Overview
The primary objective of the simulation is to predict deformation associated with the underlying physical phenomena during the process. To achieve this, a thermo-mechanical coupled approach was implemented, enabling the observation of strain evolution across multiple layers under both thermal and mechanical loading conditions. This approach provided a more comprehensive representation of the interplay between heat transfer and mechanical response.
Additionally, the inherent strain method was applied as a purely mechanical strategy to estimate deformation. By comparing both methods, the study highlights the mechanisms of strain generation and demonstrates the effectiveness of different modeling techniques in capturing deformation behavior.
5.2. Modeling Assumptions and Heat Source
In the thermo-mechanical coupled simulation, temperature-dependent material properties were incorporated to capture the influence of thermal variations on mechanical response. Sintering kinetics were neglected to simplify the analysis and focus on deformation prediction.
The laser was modeled as a moving heat source with a Gaussian distribution, represented by a three-dimensional conical heat source model. A scan strategy with a rotation between layers was applied to replicate the actual processing conditions. Boundary conditions included both mechanical constraints and thermal effects, accounting for heat losses through convection and radiation, with the substrate temperature maintained at 200 °C.
Thermal conductivity was reduced by
during element deactivation and restored to its original value upon activation.
Table 2 summarizes the key fabrication parameters used in the simulation.
Cooling was considered to occur exclusively through convection and radiation. Strong interlayer adhesion was observed, minimizing typical issues such as delamination or cracks induced by thermal stresses. The fabricated parts showed good agreement with the CAD model.
5.3. Geometry and Mesh
The model geometry was created in FreeCAD to accurately represent the configuration of the part under study. Meshing was performed with Gmsh, yielding approximately 400,000 elements. A total of 167 layers were defined to capture the layer-wise process, with element activation implemented sequentially. As illustrated in
Figure 1, this approach ensured a balance between computational efficiency and adequate resolution to capture the thermo-mechanical behavior.
5.4. Material Properties
The chemical composition of AlSi10Mg powder provided by Carpenter additive headquartered in Philadelphia, Pennsylvania is shown in
Table 3. This lightweight, high-strength aluminum alloy is widely applied in the aerospace, automotive, and medical sectors. Its combination of aluminum, silicon, and magnesium makes it highly suitable for additive manufacturing.
5.5. Post-Processing
Post-processing of simulation results was conducted in ParaView to visualize and analyze both temperature fields and displacement distributions. Its plotting capabilities allowed for detailed assessment of the thermo-mechanical response, while scripting functions automated comparisons between simulated deformed geometries and STL models reconstructed from 3D-scanned point clouds. This enabled systematic evaluation of discrepancies between numerical predictions and experimental data.
5.6. Computational Resources
All simulations were performed on a high-performance workstation equipped with dual Intel Xeon E5-2603 processors (8 cores total), 64 GB RAM, and an NVIDIA GeForce GTX 1070 GPU with 8 GB GDDR5 memory. This configuration provided the computational power required for large-scale thermo-mechanical simulations while balancing efficiency and accuracy.
5.7. Validation Strategy
Validation was carried out using both literature benchmarks [
11] and experimental measurements. Reference [
11] reported temperature distributions across 10 layers.
Experiments were conducted on a SLM 280HL machine, manufactured by Nikon SLM Solutions Group AG headquartered in Lubeck, Germany (
Figure 3), characterized by precise control of laser power, scan strategy, and layer thickness in an inert atmosphere (argon/nitrogen). Proper control ensured high dimensional accuracy, minimized defects (e.g., porosity, lack of fusion), and enabled production of geometrically complex parts with excellent mechanical performance.
Figure 4 and
Figure 5 show the laser melting process and fabricated samples, respectively. Post-processing included support removal and 3D scanning using a Konica Minolta Range 7 system to quantify deviations from the CAD model.
Throughout printing, homogeneous fusion was observed without delamination, shifting, or crack formation. The parts retained stability and showed no visible thermal-stress-induced defects. As expected, the surface exhibited typical roughness from layer accumulation, which may be improved with finishing processes.
5.8. Simulation Results
Simulation results are presented in
Figure 6. Most regions (green) showed deviations within 0.1 mm, while yellow regions indicated 0.2–0.4 mm, consistent with experimental observations.
Table 4 presents a statistical comparison between the dimensional deviations of three fabricated samples and the corresponding simulation results. The experimental measurements indicate maximum deviations in the range of approximately
mm, whereas the simulation predicted considerably smaller extrema (0.09–0.38 mm). This difference highlights that the numerical model underestimates localized distortions and extreme variations, which are likely influenced by process-induced phenomena such as powder bed irregularities, stochastic melt pool behavior, and surface roughness—effects that were not explicitly modeled.
Despite these differences in the extreme values, the root mean square (RMS) deviations predicted by the simulation (0.255 mm) fall within the experimental range (0.193–0.365 mm), suggesting good agreement in terms of average geometric accuracy. Furthermore, the standard deviation and variance of the simulation are lower than those observed experimentally, reflecting a smoother distribution of displacements in the numerical model. This outcome is expected, as simulations generally capture deterministic thermo-mechanical responses while omitting random fluctuations inherent in real processes.
Analysis of the average positive and negative deviations also shows consistent trends. Experimental results reveal both undersized and oversized regions relative to the CAD model, with a slightly larger tendency toward negative deviations. The simulation predicted predominantly positive deviations, corresponding to slight over-expansion. Nevertheless, the magnitude of these deviations is comparable to experimental measurements, confirming that the model adequately represents the overall deformation behavior.
Taken together, these results confirm that while the simulation tends to underestimate localized extremes, it provides reliable predictions of global geometric accuracy and average deviation trends. Thus, the thermo-mechanical model demonstrates strong consistency with experimental findings and is validated as an effective tool for predicting deformation in selective laser melting.
5.9. Scan Strategy Sensitivity Analysis
While the present validation focused on a single optimized scan strategy (67° interlayer rotation) matching the experimental manufacturing conditions, the framework’s capability to predict scan strategy effects was evaluated through comparison with literature-reported trends. The scan strategy discussion in
Section 2 synthesizes experimental findings from multiple studies [
28,
29,
30,
31], which consistently demonstrate 20–60% distortion reduction through optimized rotational and inclined scanning patterns.
Our experimental validation using a strategy—known to provide superior performance—achieved RMS distortion of 0.255 mm, representing the lower end of observed deviations and consistent with the expected benefits of rotational scanning. Systematic computational comparison across multiple scan angles using the validated framework represents an important future extension, enabling direct quantification of scan strategy sensitivity without the significant experimental cost of manufacturing multiple identical geometries with varied scanning patterns.
The computational efficiency of the framework (2–8 h per full simulation) makes such parametric studies practically feasible, although direct experimental validation of each strategy would strengthen quantitative confidence in predicted sensitivity magnitudes.
5.10. 3D Scanning and Dimensional Verification
Three-dimensional scanning was used to verify geometry and compare dimensions with the CAD model.
Figure 7 shows the scanning setup, point clouds and aligned meshes.
Figure 8 presents the results for three samples. Samples 01 and 03 lacked upper surface data due to noise, while sample 02 captured greater deformation. Green regions represent deviations within 0.1 mm, in line with simulation predictions.
The scanning confirmed excellent overall alignment with the CAD model. The discrepancies were mainly located in regions of complex geometry or sharp angles, typical for additive manufacturing. Dimensional analysis further verified that total height matched programmed layer counts, and no significant structural deformations were detected.
5.11. Concluding Insights
The findings confirm that CalculiX can accurately simulate the SLS process. Experimental validation using the SLM 280HL machine demonstrated that additive manufacturing can achieve high precision, mechanical strength, and geometric complexity. This combination underscores the potential of the technology for demanding applications in aerospace, medical, and automotive sectors, offering a competitive alternative to conventional manufacturing methods.
6. Conclusions
This research presents a comprehensive, open-source workflow for simulating additive manufacturing (AM) processes using the CalculiX solver, addressing critical gaps in accessibility, transparency, and advanced material modeling capabilities.
The developed methodology integrates advanced features such as evolving porosity, layer-wise material activation, realistic scanning strategies, and sophisticated thermal boundary conditions. These elements collectively enable accurate prediction of residual stresses and part distortions while maintaining computational efficiency suitable for standard engineering hardware.
Key findings and contributions include:
Scan Strategy Effects: Optimized bidirectional, rotational, and inclined scanning patterns reduce part distortion by 20–40%, highlighting scan path planning as a cost-effective lever for process optimization.
Computational Performance: The workflow demonstrates practical runtimes (2–8 h for realistic problems) with linear scaling and efficient parallelization, confirming feasibility for routine engineering analyses.
Parameter Sensitivity: Temperature-dependent material properties are critical for simulation accuracy, providing guidance for experimental characterization priorities.
Open-Source Advantage: Full transparency in algorithm implementation, extensive customization, and cost-effectiveness make the workflow suitable for both research and industrial applications, especially in academic or SME contexts where commercial software may be inaccessible.
6.1. Limitations and Future Directions
The current model assumes fully consolidated material properties and does not explicitly account for sintering kinetics or detailed microstructural evolution during the SLS process. This simplification, adopted to balance computational efficiency with predictive capability, focuses on capturing the dominant thermo-mechanical phenomena: thermal gradients, residual stress generation, and geometric distortion. While this approach successfully predicts overall part deformation (validated against experimental measurements with RMS deviations of 0.255 mm), incorporating sintering kinetics would enable more accurate prediction of densification rates, porosity distribution, and consolidation dynamics during melting and solidification.
Future work will extend the framework to include:
Viscous sintering models to capture time-dependent densification and porosity evolution, potentially through master sintering curve formulations.
Microstructural evolution models accounting for grain growth, texture development, and phase transformations, which influence local mechanical response.
State-dependent material properties that evolve with local density and thermal history.
Incorporation of temperature-dependent elasto–plastic constitutive models to capture irreversible deformation mechanisms. While the present framework focuses on the dominant thermoelastic response, future developments will integrate plastic strain evolution governed by a yield criterion (e.g., von Mises with isotropic hardening). This enhancement will enable more realistic prediction of residual stress relaxation, permanent distortion, and the influence of cyclic thermal loading during layer deposition.
These enhancements can be implemented through CalculiX UMAT subroutine interface, maintaining the open-source philosophy while enabling multi-scale, multi-physics simulations. Such extensions would particularly benefit predictions in regions with partial melting or complex thermal histories, where microstructure-property relationships become critical for accurate residual stress assessment.
6.2. Summary and Impact
The workflow is supported by comprehensive documentation, preprocessing scripts, material property databases, and post-processing tools, enabling reproducibility and broader adoption within the AM community.
Future research directions include:
Systematic experimental validation of multiple scan strategies—Conduct controlled experimental campaigns comparing unidirectional, 45∘, 67∘, and 90∘ rotations, as well as bidirectional and chessboard patterns, across representative materials and geometries. Comprehensive 3D scanning and XRD characterization will be employed to quantitatively validate the framework’s predictive accuracy and establish confidence limits for scan strategy optimization.
Systematic experimental validation across multiple scan strategies, materials and geometries to establish quantitative confidence limits and validate scan strategy optimization predictions.
Integration of advanced microstructural evolution models, multi-scale simulations, and process optimization frameworks.
Extension of the workflow to other AM processes beyond SLS, such as EBM and DED, to expand applicability.
In conclusion, this work demonstrates that sophisticated, high-fidelity AM simulations can be achieved using open-source tools, effectively removing barriers imposed by commercial software. By providing a validated, accessible, and extensible simulation framework, this research promotes wider adoption, community-driven development, and continued innovation in additive manufacturing.