Skip to content

Worlthen/Nut-model

Repository files navigation

Chocolate Bending Simulation - Abaqus FEA Project

This project contains comprehensive Abaqus finite element analysis models for studying the mechanical behavior and failure mechanisms of chocolate bars under three-point bending loads. The project includes four distinct model configurations to analyze different scenarios and implementation approaches.

Project Overview

The project simulates stress distribution, crack initiation, and failure behavior in chocolate bars under bending loads. Two main scenarios are studied:

  1. Pure chocolate bars (homogeneous material)
  2. Chocolate bars with embedded nuts (composite material)

Each scenario is implemented in two programming approaches:

  • Function-based: Modular, reusable code architecture
  • No-function: Linear, sequential script execution

Model Configurations

1. With-Nut Models (models/with-nut/)

Simulates chocolate bars containing embedded nuts to study the effect of inclusions on mechanical behavior.

Function-Based Implementation (function-based/Nut_model_Functiont.py)

  • Architecture: Modular functions for each simulation phase
  • Features:
    • Parameterized geometry creation
    • Automated mesh generation with local refinement
    • Material property assignment for chocolate and nut
    • Load and boundary condition setup
    • Post-processing and visualization
  • Advantages:
    • Easy parameter modification
    • Reusable code components
    • Suitable for parametric studies
    • Better maintainability

No-Function Implementation (no-function/Nut_model_noFunction.py)

  • Architecture: Linear script execution
  • Features:
    • Direct sequential operations
    • Fixed parameter definitions
    • Inline geometry and analysis setup
  • Advantages:
    • Simple to understand and follow
    • Direct execution flow
    • Good for single-run analyses

2. Pure Chocolate Models (models/pure-chocolate/)

Simulates homogeneous chocolate bars to study crack initiation and propagation in pure material.

Function-Based Implementation (function-based/Pure_model_crack_position_0221.py)

  • Architecture: Modular functions specialized for crack analysis
  • Features:
    • Crack initiation and propagation modeling
    • Damage mechanics implementation
    • Position-dependent crack studies
    • Advanced post-processing for fracture analysis
  • Advantages:
    • Focused on crack mechanics
    • Modular crack analysis functions
    • Suitable for fracture mechanics research

No-Function Implementation (no-function/Pure_model_nofunction_0221.py)

  • Architecture: Linear script with automated mesh studies
  • Features:
    • Mesh convergence studies
    • Batch processing for multiple mesh sizes
    • Automated result organization
  • Advantages:
    • Comprehensive mesh sensitivity analysis
    • Automated batch processing
    • Direct result comparison

Model Parameters

Geometry Parameters

  • Chocolate dimensions: 44mm × 8mm
  • Support width: 32mm
  • Press load width: 20mm
  • Nut radius: Variable (0.5mm - 2.0mm) [with-nut models only]
  • Nut height: Variable (4.5mm - 5.5mm) [with-nut models only]
  • Notch size: 4mm

Material Properties

  • Chocolate:
    • Young's modulus: 550 MPa
    • Poisson's ratio: 0.3
    • Maximum principal stress: 0.5 MPa
    • Fracture energy: 0.015 J/mm²
    • Viscosity coefficient: 0.001
  • Nut [with-nut models only]:
    • Young's modulus: 800 MPa
    • Poisson's ratio: 0.32

Loading Conditions

  • Load type: Three-point bending
  • Pressure load: 0.091 MPa
  • Support: Fixed boundary conditions at bottom edges

Project Structure

├── models/
│   ├── with-nut/
│   │   ├── function-based/
│   │   │   ├── Nut_model_Functiont.py      # Function-based with-nut model
│   │   │   └── README.md                   # Detailed documentation
│   │   └── no-function/
│   │       ├── Nut_model_noFunction.py     # Linear with-nut model
│   │       └── README.md                   # Detailed documentation
│   └── pure-chocolate/
│       ├── function-based/
│       │   ├── Pure_model_crack_position_0221.py  # Function-based pure model
│       │   └── README.md                   # Detailed documentation
│       └── no-function/
│           ├── Pure_model_nofunction_0221.py      # Linear pure model
│           └── README.md                   # Detailed documentation
├── README.md                               # This file
└── .gitignore                             # Git ignore rules

Note: The model-runs*/ directories contain simulation results and are excluded from the repository as they are generated during execution.

Usage Instructions

General Workflow

  1. Choose Model Type: Select based on your analysis needs:

    • With-nut models: For studying inclusion effects
    • Pure chocolate models: For crack propagation studies
  2. Choose Implementation: Select based on your preference:

    • Function-based: For parametric studies and code reusability
    • No-function: For simple execution and easy understanding

Execution Steps

  1. Open Abaqus CAE
  2. Navigate to Model Directory:
    cd models/[model-type]/[implementation-type]/
    
  3. Run the Script:
    execfile('script_name.py')
  4. Monitor Execution: Check Abaqus message area for progress
  5. Review Results: Check generated files and visualizations

Parameter Modification

  • Function-based models: Modify parameters in function calls
  • No-function models: Modify parameters at the top of scripts

Requirements

  • Abaqus CAE: 2020 or later
  • Python: 2.7 (Abaqus built-in)
  • Libraries: NumPy (usually included with Abaqus)
  • Hardware: Sufficient computational resources for FEA
  • Memory: Minimum 8GB RAM recommended
  • Storage: Adequate space for result files (excluded from repository)

Analysis Capabilities

Stress Analysis

  • Maximum principal stress distribution
  • Von Mises stress analysis
  • Stress concentration around inclusions

Failure Analysis

  • Damage initiation and evolution
  • Crack propagation modeling
  • Phase field damage mechanics
  • Cohesive zone modeling

Parametric Studies

  • Automated nut size and position variations
  • Mesh convergence studies
  • Material property sensitivity analysis

Post-processing

  • Automated result extraction
  • Stress and damage visualization
  • Comparative analysis plots
  • Result data export

Model Selection Guide

Analysis Goal Recommended Model
Inclusion effects study With-nut function-based
Simple inclusion analysis With-nut no-function
Crack propagation research Pure chocolate function-based
Mesh convergence study Pure chocolate no-function
Parametric optimization Any function-based model
Quick single analysis Any no-function model

Contributing

When modifying the models:

  1. Test incrementally: Start with small parameter changes
  2. Verify mesh quality: Check element quality for new geometries
  3. Validate convergence: Ensure solution convergence for modified properties
  4. Document changes: Update relevant README files
  5. Follow structure: Maintain the organized directory structure

Troubleshooting

Common Issues

  • Memory errors: Reduce mesh density or model size
  • Convergence problems: Check material properties and load increments
  • File path errors: Ensure correct working directory
  • License issues: Verify Abaqus license availability

Support

  • Check individual model README files for specific guidance
  • Review Abaqus documentation for detailed FEA procedures
  • Verify parameter ranges are within realistic bounds

License

This project is for academic and research purposes. Please cite appropriately if used in publications.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages