Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new tutorial: Two-scale composite laminate simulation with ABAQUS #412

Open
wants to merge 34 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0436777
Initial content for two-scale composite laminate simulation with ABAQUS
IshaanDesai Nov 28, 2023
f414a5d
Add base_folder path to the restart mechanism to make it generally ap…
IshaanDesai Nov 28, 2023
493c197
Try /home/desaiin in the base path
IshaanDesai Nov 28, 2023
f2de90c
Try ~ in the base path
IshaanDesai Nov 28, 2023
a8c12aa
Hard code path to micro simulation folder
IshaanDesai Nov 28, 2023
0f780e1
Set base folder path in solve() too
IshaanDesai Nov 28, 2023
60a737e
Add cleaning scripts, images and README content
IshaanDesai Nov 28, 2023
bbb3c71
Reduce size of image and scale images in README
IshaanDesai Nov 28, 2023
4815933
Use - instead of _ in participant folder names
IshaanDesai Nov 28, 2023
a9cad1e
Correct rm command
IshaanDesai Nov 28, 2023
400a225
Further modifications to the README
IshaanDesai Nov 28, 2023
bc6ce10
Set correct paths in cleaning script, update links in the README
IshaanDesai Nov 29, 2023
be9250a
Use correct path to preCICE config file
IshaanDesai Nov 29, 2023
2e53836
Check the working directory in VUMAT.f
IshaanDesai Nov 29, 2023
0534b8f
Use correct path to the precice config file in VUMAT.f
IshaanDesai Nov 29, 2023
25772a0
Use correct cleaning script
IshaanDesai Nov 29, 2023
4aedd9e
Use correct path to cleaning tools in the script for cleaning the ruc
IshaanDesai Nov 29, 2023
54c7807
Add absolute paths note in the README
IshaanDesai Nov 29, 2023
f3f3b10
Hard code exchange directory in precice-config.xml and also try intra…
IshaanDesai Nov 29, 2023
04312de
Try paralle execution of Micro Manager with 2 CPUs
IshaanDesai Nov 29, 2023
4ebf1ea
Add coupling workflow to the README
IshaanDesai Nov 29, 2023
15ecdd1
Add intra participant communication tag for the Micro Manager
IshaanDesai Nov 29, 2023
5a6789b
Launch abaqus via mpiexec to make it use only one CPU
IshaanDesai Nov 29, 2023
83dd8e4
Use mpiexec, but keep the simulation serial
IshaanDesai Nov 29, 2023
5e8a910
Merge branch 'develop' into abaqus-multiscale
IshaanDesai Dec 4, 2023
80d05bd
Add note in README about the large runtime of the case
IshaanDesai Dec 4, 2023
fc1fcf7
Merge branch 'develop' into abaqus-multiscale
IshaanDesai Dec 6, 2023
66d37d7
Correct indent in tools/cleaning-tools.sh
IshaanDesai Dec 17, 2023
575a875
Remove user specific commands from cleaning scripts
IshaanDesai Dec 17, 2023
374f9e3
Merge branch 'abaqus-multiscale' of github.com:precice/tutorials into…
IshaanDesai Dec 17, 2023
2bffadc
Add reference to RUC
IshaanDesai Dec 17, 2023
43feb3e
Add documentation to post-processing script get_stresses.py
IshaanDesai Dec 19, 2023
b147e3f
Add comment in the material model Fortran file
IshaanDesai Dec 19, 2023
1e394d5
Merge branch 'develop' into abaqus-multiscale
IshaanDesai Dec 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions tools/cleaning-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,37 @@ clean_dune() {
clean_precice_logs .
)
}

clean_abaqus() {
(
set -e -u
cd "$1"
echo "--- Cleaning up ABAQUS case in $(pwd)"
rm -rfv ./*.abq
rm -rfv ./*.com
rm -rfv ./*.dat
rm -rfv ./*mdl
rm -rfv ./*.msg
rm -rfv ./*.odb
rm -rfv ./*.pac
rm -rfv ./*.prt
rm -rfv ./*.res
rm -rfv ./*.sel
rm -rfv ./*.sta
rm -rfv ./*.stt
rm -rfv ./*.src
rm -rfv ./*.exception
rm -rfv ./*.cid
rm -rfv ./*.lck
rm -rfv ./*.env
rm -rfv ./*.simlog
rm -rfv ./*.simdir
rm -fv ./*.bak
rm -fv ./*.rpy
rm -fv ./*.par
rm -fv ./*.pes
rm -fv ./*.pmg
rm -fv ./*.sim
clean_precice_logs .
)
}
51 changes: 51 additions & 0 deletions two-scale-composite-laminate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: Two-scale composite laminate
permalink: tutorials-two-scale-composite-laminate.html
keywords: Meso-micro, Micro Manager, Composite laminate
summary: We solve a two-scale composite laminate problem with a predefined micro structure. One meso simulation is coupled to several micro simulations using the Micro Manager.
---

{% note %}
Get the [case files of this tutorial](https://github.com/precice/tutorials/tree/master/two-scale-composite-laminate). Read how in the [tutorials introduction](https://www.precice.org/tutorials.html).
{% endnote %}

This tutorial solves a two-scale coupled simulation of a composite structure using the preCICE coupling library. One meso-scale simulation is coupled to many micro-scale simulations. Both the scales are solved using [ABAQUS](https://www.3ds.com/products-services/simulia/products/abaqus/). This case was developed at the [Composite Structures Lab](https://sites.google.com/umich.edu/um-csl) of the University of Michigan, with a significant contribution from [Minh Hoang Nguyen](https://github.com/mhoangnUM). At each Gauss point of the meso domain there exists a micro simulation. The micro simulation is a repeated unit cell (RUC) model. The meso problem is one participant, which is coupled to many micro simulations. Each micro simulation is not an individual coupling participant, instead we use a managing software which controls all the micro simulations and their coupling via preCICE.

This tutorial shows how to couple ABAQUS to other simulation software via preCICE. The [VUMAT.f](meso-laminate-abaqus/VUMAT.f) uses the Fortran bindings of the preCICE API for coupling. On the micro scale, ABAQUS simulations for each micro simulation are started from scratch in every time step.

## Setup

The meso-scale model is a 3D beam structure which is being axially loaded.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could add some more information or real-life example of what this case is supposed to represent.

Copy link
Member Author

@IshaanDesai IshaanDesai Dec 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will describe the composite nature of the geometry, but apart from that, there is not more to it than just a beam which is axially loaded. An axially loaded beam is a standard and widely-known example case in structural mechanics.


<img src="images/tutorials-two-scale-composite-laminate-meso-laminate.png" width="500" height="400">

Check failure on line 20 in two-scale-composite-laminate/README.md

View workflow job for this annotation

GitHub Actions / check_md

Images should have alternate text (alt text)

The micro-scale model is a 3D fibre structure.

<img src="images/tutorials-two-scale-composite-laminate-ruc.png" width="300" height="330">

Check failure on line 24 in two-scale-composite-laminate/README.md

View workflow job for this annotation

GitHub Actions / check_md

Images should have alternate text (alt text)

The coupling workflow is as follows
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any information about how the mesh was generated? How was the case created?


<img src="images/tutorials-two-scale-composite-laminate-coupling-workflow.png" width="900" height="500">

Check failure on line 28 in two-scale-composite-laminate/README.md

View workflow job for this annotation

GitHub Actions / check_md

Images should have alternate text (alt text)

## Available solvers and dependencies

* Both the macro and micro simulations are solved using the finite element software [ABAQUS](https://www.3ds.com/products-services/simulia/products/abaqus/) 2022.
* The [Micro Manager](https://precice.org/tooling-micro-manager-installation.html) controls all micro-simulations and facilitates coupling via preCICE. To solve this case, use the [develop](https://github.com/precice/micro-manager/tree/develop) branch of the Micro Manager.

## Running the simulation

This case was developed by running it on the [Great Lakes HPC cluster](https://arc.umich.edu/greatlakes/) at the University of Michigan. In principle the setup should work on any machine or cluster which has an adequate amount of ABAQUS licenses. To case is run on the Great Lakes HPC cluster via a SLURM job submission script, which is given for reference as [submit_job.sbat](submit_job.sbat).

Due to restrictions in the way ABAQUS creates folder and starts the simulation, some paths are hard coded in this example. The exchange directory in [precice-config.xml](precice-config.xml) and the directory paths in [micro-ruc-abaqus/ruc_abaqus_restart.py](micro-ruc-abaqus/ruc_abaqus_restart.py) are currently set manually.

Currently simulations on both the scales are run in serial. Running all the micro simulations in serial is extremely slow, which makes the total run time of this case several days. The main idea of this tutorial is to show how ABAQUS can be coupled via preCICE in a mutliscale setting.
Comment on lines +37 to +41
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not clear to me if this case should be in the tutorials, but I do understand it is an interesting study case for the PreECO project, where we want to establish such guidelines.

In my perspective, this case seems to be rather too specific to a setup, system, and solver, which makes it difficult to reuse. We can also not test it, since we don't have Abaqus licenses, so we will not be able to maintain or check it in the future, which is a promise we give for our tutorials.

It also seems to be an early prototype, as stated by the "currently simulations on both the scales are run in serial", from which I understand that this will be a validation case for your research.

We also have the Community projects section, which serves as a place to share cases that we don't promise to maintain.

What maintenance plan would you suggest? What do we need to maintain this case? Will you have access to the system and codes long-enough or easily on demand?

We have more ways to publish cases, we don't need that everything is in the tutorials. In my understanding, tutorials should be rather flexible, extensible, and reusable. They should be starting points. We do have old cases that could be improved in this direction, but I think that new cases should as much as possible be more flexible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the moment my standard answer would be: add now and potentially move somewhere else later once we have guidelines. This just forces us (i.e. @IshaanDesai ) to clean up and document such cases.

Maintaining should be doable as we now have access to Abaqus licenses in Stuttgart.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the need and the impulse to "just add it to make people happy and move on", but as a reviewer, I am obliged to point out that

  1. nothing is more permanent in Software Engineering than a temporary hack
  2. this creates precedent for adding more special cases

With the knowledge that we already got the PreECO project and that via that we have a "contract" to clean things up and come up with such guidelines, I don't mind accepting such a special case now.

Maintaining should be doable as we now have access to Abaqus licenses in Stuttgart.

That's good news! This case then could be a test case for integrating proprietary codes into our system tests.


## Post-processing

Both the meso and micro scale simulations produce output files which can be viewed in ABAQUS. The axial displacement on the meso scale looks like

<img src="images/tutorials-two-scale-composite-laminate-meso-u1.png" width="400" height="250">

Check failure on line 47 in two-scale-composite-laminate/README.md

View workflow job for this annotation

GitHub Actions / check_md

Images should have alternate text (alt text)

The displacement on the micro scale looks like

<img src="images/tutorials-two-scale-composite-laminate-micro-ruc-u1.png" width="400" height="350">

Check failure on line 51 in two-scale-composite-laminate/README.md

View workflow job for this annotation

GitHub Actions / check_md

Images should have alternate text (alt text)
1 change: 1 addition & 0 deletions two-scale-composite-laminate/clean-tutorial.sh
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
*Heading
** Job name: Crossply_meso_18elements Model name: Model-1
** Generated by: Abaqus/CAE 2022
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we allowed to publish files generated by Abaqus? Does the Abaqus license specify what license is attached to these files? Is it compatible with our LGPL-3.0 license?

Maybe a better question: Can we automate (and parameterize) the generation of this file? What if I wanted to use a different mesh size?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to look up if Abaqus imposes a license on auto-generated input files, and there are no clear instructions. There are ample open-source repositories which directly upload Abaqus input files. This input file is actually usable via other FEM softwares too, for example, CalculiX. It is just generated by Abaqus.

Automation of the generation of this file could be possible, but I won't invest time in this. We get a fixed mesh here, for a different mesh size, one would have to go through the Abaqus GUI, load this file, change the mesh size, and generate another file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you then maybe document the steps to generate such a new mesh?

*Preprint, echo=NO, model=NO, history=NO, contact=NO
** ----------------------------------------------------------------
**
** PART INSTANCE: Inst_Laminate
**
*Node
1, -0.914399981, -0.457199991, 0.182879999
2, -0.914399981, 0.457199991, 0.182879999
3, -0.914399981, 0.457199991, 0.
4, -0.914399981, -0.457199991, 0.
5, 0.914399981, 0.457199991, 0.182879999
6, 0.914399981, 0.457199991, 0.
7, 0.914399981, -0.457199991, 0.
8, 0.914399981, -0.457199991, 0.182879999
9, -0.914399981, 0.457199991, 0.548640013
10, -0.914399981, -0.457199991, 0.548640013
11, -0.914399981, -0.457199991, 0.731519997
12, -0.914399981, 0.457199991, 0.731519997
13, 0.914399981, -0.457199991, 0.548640013
14, 0.914399981, -0.457199991, 0.731519997
15, 0.914399981, 0.457199991, 0.731519997
16, 0.914399981, 0.457199991, 0.548640013
17, -0.914399981, 0., 0.182879999
18, -0.914399981, 0., 0.
19, 0.914399981, 0., 0.182879999
20, 0.914399981, 0., 0.
21, -0.304800004, -0.457199991, 0.
22, 0.304800004, -0.457199991, 0.
23, 0.304800004, -0.457199991, 0.182879999
24, -0.304800004, -0.457199991, 0.182879999
25, 0.304800004, 0.457199991, 0.
26, -0.304800004, 0.457199991, 0.
27, -0.304800004, 0.457199991, 0.182879999
28, 0.304800004, 0.457199991, 0.182879999
29, -0.914399981, 0., 0.548640013
30, -0.914399981, 0., 0.731519997
31, 0.914399981, 0., 0.548640013
32, 0.914399981, 0., 0.731519997
33, -0.304800004, 0.457199991, 0.731519997
34, 0.304800004, 0.457199991, 0.731519997
35, 0.304800004, 0.457199991, 0.548640013
36, -0.304800004, 0.457199991, 0.548640013
37, 0.304800004, -0.457199991, 0.731519997
38, -0.304800004, -0.457199991, 0.731519997
39, -0.304800004, -0.457199991, 0.548640013
40, 0.304800004, -0.457199991, 0.548640013
41, -0.304800004, 0., 0.182879999
42, 0.304800004, 0., 0.182879999
43, -0.304800004, 0., 0.
44, 0.304800004, 0., 0.
45, -0.304800004, 0., 0.548640013
46, 0.304800004, 0., 0.548640013
47, -0.304800004, 0., 0.731519997
48, 0.304800004, 0., 0.731519997
*Element, type=C3D8R
1, 24, 41, 43, 21, 1, 17, 18, 4
2, 41, 27, 26, 43, 17, 2, 3, 18
3, 23, 42, 44, 22, 24, 41, 43, 21
4, 42, 28, 25, 44, 41, 27, 26, 43
5, 8, 19, 20, 7, 23, 42, 44, 22
6, 19, 5, 6, 20, 42, 28, 25, 44
7, 36, 45, 47, 33, 9, 29, 30, 12
8, 45, 39, 38, 47, 29, 10, 11, 30
9, 35, 46, 48, 34, 36, 45, 47, 33
10, 46, 40, 37, 48, 45, 39, 38, 47
11, 16, 31, 32, 15, 35, 46, 48, 34
12, 31, 13, 14, 32, 46, 40, 37, 48
13, 27, 41, 45, 36, 2, 17, 29, 9
14, 41, 24, 39, 45, 17, 1, 10, 29
15, 28, 42, 46, 35, 27, 41, 45, 36
16, 42, 23, 40, 46, 41, 24, 39, 45
17, 5, 19, 31, 16, 28, 42, 46, 35
18, 19, 8, 13, 31, 42, 23, 40, 46
*Nset, nset=Inst_Laminate_Set_0_plies
1, 2, 5, 8, 9, 10, 13, 16, 17, 19, 23, 24, 27, 28, 29, 31
35, 36, 39, 40, 41, 42, 45, 46
*Elset, elset=Inst_Laminate_Set_0_plies, generate
13, 18, 1
*Nset, nset=Inst_Laminate_Set_90_plies, generate
1, 48, 1
*Elset, elset=Inst_Laminate_Set_90_plies, generate
1, 12, 1
*Nset, nset=Inst_Laminate_Set_ALL, generate
1, 48, 1
*Elset, elset=Inst_Laminate_Set_ALL, generate
1, 18, 1
*Orientation, name=Inst_Laminate-Ori-2
1., 0., 0., 0., 1., 0.
3, 90.
** Region: (Sec_LAMINA:Set_ALL), (Controls:EC-1), (Material Orientation:Set_90_plies)
*Elset, elset=Inst_Laminate__I1, generate
1, 12, 1
** Section: Sec_LAMINA
*Solid Section, elset=Inst_Laminate__I1, orientation=Inst_Laminate-Ori-2, controls=EC-1, material=Mat_LAMINA
,
*Orientation, name=Inst_Laminate-Ori-1
1., 0., 0., 0., 1., 0.
1, 0.
** Region: (Sec_LAMINA:Set_ALL), (Controls:EC-1), (Material Orientation:Set_0_plies)
*Elset, elset=Inst_Laminate__I2, generate
13, 18, 1
** Section: Sec_LAMINA
*Solid Section, elset=Inst_Laminate__I2, orientation=Inst_Laminate-Ori-1, controls=EC-1, material=Mat_LAMINA
,
*System
*Nset, nset=Set_X0
1, 2, 3, 4, 9, 10, 11, 12, 17, 18, 29, 30
*Elset, elset=Set_X0
1, 2, 7, 8, 13, 14
*Nset, nset=Set_X1
5, 6, 7, 8, 13, 14, 15, 16, 19, 20, 31, 32
*Elset, elset=Set_X1
5, 6, 11, 12, 17, 18
**
** ELEMENT CONTROLS
**
*Section Controls, name=EC-1, hourglass=ENHANCED
1., 1., 1.
*Amplitude, name=Amp_Loading
0., 0., 1., 1.
**
** MATERIALS
**
*Material, name=Mat_LAMINA
*Density
1.5e-09,
*Depvar, delete=7
8,
*User Material, constants=5
160000.,9000.,5700., 0.32, 0.44
**
** BOUNDARY CONDITIONS
**
** Name: BC_X0 Type: Displacement/Rotation
*Boundary
Set_X0, 1, 1
** ----------------------------------------------------------------
**
** STEP: Step_Loading
**
*Step, name=Step_Loading, nlgeom=NO
*Dynamic, Explicit
, 0.1
*Bulk Viscosity
0.06, 1.2
** Mass Scaling: Semi-Automatic
** Whole Model
*Variable Mass Scaling, dt=1e-05, type=below min, frequency=10
**
** BOUNDARY CONDITIONS
**
** Name: BC_X1 Type: Displacement/Rotation
*Boundary, amplitude=Amp_Loading
Set_X1, 1, 1, 0.036576
**
** OUTPUT REQUESTS
**
*Restart, write, number interval=1, time marks=NO
**
** FIELD OUTPUT: F-Output-1
**
*Output, field, number interval=1000
*Node Output
U,
*Element Output, directions=YES
LE, S, SDV, STATUS
**
** HISTORY OUTPUT: H-Output-1
**
*Output, history, variable=PRESELECT
*End Step
Loading
Loading