# Is it possible to define a prestress at the initial state of a simulation?

**URL:** <https://calculix.discourse.group/t/is-it-possible-to-define-a-prestress-at-the-initial-state-of-a-simulation/2149>\
**Category:** Uncategorized\
**Created:** [March 13, 2024, 1:55pm UTC](https://calculix.discourse.group/t/is-it-possible-to-define-a-prestress-at-the-initial-state-of-a-simulation/2149 "2024-03-13T13:55:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nobody-86](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@Nobody-86](https://calculix.discourse.group/u/Nobody-86)\
**Post date:** [March 13, 2024, 1:55pm UTC](https://calculix.discourse.group/t/is-it-possible-to-define-a-prestress-at-the-initial-state-of-a-simulation/2149/1 "2024-03-13T13:55:01Z")

</div>

Hello everyone,

I don’t have a specific use case at the moment, but I’m curious if it’s possible to add a preload to a model in Calculix. By preload I don’t mean a bolt, or oversize fit and such, but a stress field that is present in the unloaded component. I can think of two specific applications on the spur at the moment:

- A part is loaded beyond its yield point and begins to deform plastically. At a certain level, the deformation is high enough for the elements to be heavily distorted. The calculation is then stopped, the component is remeshed and the previously calculated stresses and/or (plastic) strains are mapped onto the new mesh.
- A forged or cast part should be examined. The manufacturing process was simulated in advance and the residual stresses resulting from the manufacturing process are to be taken into account in the calculation in Calculix.

Regardless of the fact that the remeshing happens somewhere externally, just like the simulation of the manufacturing process, is there a way to map a known stress field to all nodes in the model, which serve as the initial state? Or does Calculix have to be calculated from the zero state?

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [March 13, 2024, 2:15pm UTC](https://calculix.discourse.group/t/is-it-possible-to-define-a-prestress-at-the-initial-state-of-a-simulation/2149/2 "2024-03-13T14:15:04Z")

</div>

Yes, you can use `*INITIAL CONDITIONS, TYPE=STRESS` and `*INITIAL CONDITIONS, TYPE=PLASTIC STRAIN` but unfortunately there’s no built-in functionality to read them from a file. Their components have to be specified per element and integration point using the data lines of this keyword.

---

<div class="post-metadata">

**Author:** ![xyont](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/xyont/32/3553_2.png) [@xyont](https://calculix.discourse.group/u/xyont)\
**Post date:** [March 13, 2024, 2:44pm UTC](https://calculix.discourse.group/t/is-it-possible-to-define-a-prestress-at-the-initial-state-of-a-simulation/2149/3 "2024-03-13T14:44:15Z")

</div>

an interesting approach from this threads

> [@\*INITIAL CONDITIONS on elements or sets of elements](https://calculix.discourse.group/t/initial-conditions-on-elements-or-sets-of-elements/764/2):
>
> i think i can handle it. I 'll work with sets of elements, \*EL PRINT,ELSET=Esets S if necessary with \*TEMPERATURE and with Spreadsheet and include the spreadsheet with \*INCLUDE, INPUT=INITIAL\_CONDITIONS.nam wbr & thnx to Calc\_em

---

<div class="post-metadata">

**Author:** ![Nobody-86](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@Nobody-86](https://calculix.discourse.group/u/Nobody-86)\
**Post date:** [March 13, 2024, 2:45pm UTC](https://calculix.discourse.group/t/is-it-possible-to-define-a-prestress-at-the-initial-state-of-a-simulation/2149/4 "2024-03-13T14:45:20Z")

</div>

Many thanks!  
I looked at the INITIAL CONDITIONS chapter in the user manual. This seems to be exactly what I had in mind. What I would like to know now is how to get to the positions of the integration points. A potential process would look like this: I have a field with X-Y-Z coordinates and, for example, an associated stress tensor. Then I would need a way to determine the X-Y-Z positions of the integration points for each element. Is it possible to determine these geometrically from the nodes of the element? Finally, I would infer the tensor for each of these positions using a suitable interpolation method.

---

<div class="post-metadata">

**Author:** ![NorbertH](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@NorbertH](https://calculix.discourse.group/u/NorbertH)\
**Post date:** [March 13, 2024, 2:56pm UTC](https://calculix.discourse.group/t/is-it-possible-to-define-a-prestress-at-the-initial-state-of-a-simulation/2149/5 "2024-03-13T14:56:32Z")

</div>

> [@Nobody-86](#):
>
> Then I would need a way to determine the X-Y-Z positions of the integration points for each element. Is it possible to determine these geometrically from the nodes of the element?

Yes it is. But you will have to compute them with the use of the isoparametric integration point coordinates, shape functions and the nodal coordinates for each element.

here you can take a look how i’ve done it for the .dat to paraview conversion.

> <https://github.com/calculix/Cubit-CalculiX/blob/main/src/Core/CoreResultsVtkWriter.cpp#L2897>

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [March 13, 2024, 2:59pm UTC](https://calculix.discourse.group/t/is-it-possible-to-define-a-prestress-at-the-initial-state-of-a-simulation/2149/6 "2024-03-13T14:59:29Z")

</div>

ParaView can map the data from point cloud to a mesh. Maybe it could be helpful here.

> **[How to add temperature data for external mesh?](https://discourse.paraview.org/t/how-to-add-temperature-data-for-external-mesh/5387)**
>
> Dear All, I have a dataset which contains x, y and z co-ordinates along with temperature data. Since, it is point clouds and in Paraview it is visible as points, Delaunay gave very rough mesh and so I could not create a mesh out of it. Based on...

---

<div class="post-metadata">

**Author:** ![Nobody-86](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@Nobody-86](https://calculix.discourse.group/u/Nobody-86)\
**Post date:** [March 13, 2024, 3:37pm UTC](https://calculix.discourse.group/t/is-it-possible-to-define-a-prestress-at-the-initial-state-of-a-simulation/2149/7 "2024-03-13T15:37:03Z")

</div>

It all looks very good and promising. Many thanks for all the inspiration.
