# Simple Shell Thickness Optimization

**URL:** <https://prepomax.discourse.group/t/simple-shell-thickness-optimization/2303>\
**Category:** Tips & Tricks\
**Tags:** results, compilation\
**Created:** [December 22, 2024, 10:16pm UTC](https://prepomax.discourse.group/t/simple-shell-thickness-optimization/2303 "2024-12-22T22:16:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhayrettin](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mhayrettin](https://prepomax.discourse.group/u/mhayrettin)\
**Post date:** [December 22, 2024, 10:16pm UTC](https://prepomax.discourse.group/t/simple-shell-thickness-optimization/2303/1 "2024-12-22T22:16:50Z")

</div>

## Hi,

## I’ve been trying to be more familiar with open source fea. This time, i built a simple shell model and tried to optimize thickness of shell elements.

## _If you want to try something new on top of that, try yourself or continue this topic to discuss together._

# ---------------------------------------------------------------------

# `simpleShellThicknessOpt` : Example shell thickness static loading deformation optimization.

## Model Explanation

### As you can see, there is a plate similar to a cantilever beam. One end is fixed and there is a vertical laod applied on the other end.

 ![image](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/8/8fd08cf8fd3858861802e6785c2d025dcdbd4309.png)

### There are 7 shell sections on this plate in order to control thicknesses of shell elements to get the desired deformation.

 ![image](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/2/290a53fe18827343fac72fc16d67fcee1fc8f746.png)  
 ![image](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/3/3ecc37915520081e1280afec03f44b0f50a9d654.png)

### `Material` is not important for us now. I don’t even remember what did i assisgned.

## ----------------------------------------------------------------------

### General Loop is very simple here:

 ![image](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/0/094608c7a729576d7a1bf22969cf998d8a51e2e0.png)

## ----------------------------------------------------------------------

### Final result histories saved as .png file.

 ![image](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/6/620e5ecdc4a75bacecddd4aec291a1b3eb51bba4.png)

## ----------------------------------------------------------------------

## ----------------------------------------------------------------------

# How to Use:

## You may try changing these basically:

### 1) `thicknessStarter` @line#17.

### 2) `incrementStep` @line#23

### 3) `maxIterations` @line#24

### 3) `deformationLimit` @line#25

## or add any other things you like. Play with it.

## What are those things?

### `\\01_modules\\A_INP_FILE_GENERATION.py`

> This script changes shell thicknesses of a base analysis .inp file and saves it as `base_i.inp` for each iteration.

### `\\01_modules\\B_AUTOMATED_MULTI_RUN_MODULE.py`

> This script runs your analysis files in CalcuLix (.inp’s for this case)
> 
> > Check `main\\automatedMultiRun\\automatedMultiRun.py` if you like. This is so similar to it or maybe exactly same i did not check recently.

### `\\01_modules\\C_getResultsFromFRD.py`

> This parses some nodal results from .FRD result files. Only `dy: deformation along y axis` used for this case.
> 
> > Check `main\\getResultsFromFRD\\getResultsFromFRD.py` if you like. Similar things, i just do not parse stresses etc. for this case because only deformations were needed.

### `\\01_modules\\D_shellThicknessOptRun.py`

> This script gets other needed modules, creates initialization needed, and also contains optimization loop (believe it or not there is an extremely high level optimization algorithm in it…)
