# Time step changing

**URL:** <https://precice.discourse.group/t/time-step-changing/1050>\
**Category:** Using preCICE\
**Tags:** openfoam, calculix\
**Created:** [May 20, 2022, 6:10pm UTC](https://precice.discourse.group/t/time-step-changing/1050 "2022-05-20T18:10:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fatiha](https://avatars.discourse-cdn.com/v4/letter/f/bbe5ce/32.png) [@fatiha](https://precice.discourse.group/u/fatiha)\
**Post date:** [May 20, 2022, 6:10pm UTC](https://precice.discourse.group/t/time-step-changing/1050/1 "2022-05-20T18:10:34Z")

</div>

I’m trying to change time step in preCICE / OpenFOAM and CalculiX but I’m find a error to simulate a case can you look for it please?

```nohighlight

 iteration 1

 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the energy calculation.

 Using up to 1 cpu(s) for the symmetric stiffness/mass contributions.

 Factoring the system of equations using the symmetric spooles solver
 Using up to 1 cpu(s) for spooles.

 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the energy calculation.

 average force= 15469129.249106
 time avg. forc= 1934082.949982
 largest residual force= 0.000001 in node 39 and dof 1
 largest increment of disp= 9.712185e+02
 largest correction to disp= 9.712185e+02 in node 38 and dof 1

 no convergence

 iteration 2

 Using up to 1 cpu(s) for the symmetric stiffness/mass contributions.

 Factoring the system of equations using the symmetric spooles solver
 Using up to 1 cpu(s) for spooles.

 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the energy calculation.

 average force= 15469129.249106
 time avg. forc= 1934082.949982
 largest residual force= 0.000000 in node 51 and dof 1
 largest increment of disp= 9.712185e+02
 largest correction to disp= 7.011653e-11 in node 63 and dof 1

 convergence

Adapter writing coupling data...
Writing DISPLACEMENTS coupling data with ID '2'. 
Adapter calling advance()...
---[precice] relative convergence measure: relative two-norm diff of data "Displacement" = 2.63e-02, limit = 5.00e-02, normalization = 4.01e+03, conv = true
---[precice] relative convergence measure: relative two-norm diff of data "Force" = 5.17e-01, limit = 5.00e-02, normalization = 2.09e+08, conv = false
---[precice] ERROR: Send using sockets failed with system error: write: Broken pipe

```

[flap.inp](https://precice.discourse.group/uploads/short-url/jcF1OKBZR6DtqoShkpwWQgariRz.inp) (374 Bytes)  
[precice-config.xml](https://precice.discourse.group/uploads/short-url/scrgVLAGwWOlSmjZQz5KqCH429E.xml) (2.4 KB)

---

<div class="post-metadata">

**Author:** ![boris-martin](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/boris-martin/32/705_2.png) [@boris-martin](https://precice.discourse.group/u/boris-martin)\
**Post date:** [May 20, 2022, 7:27pm UTC](https://precice.discourse.group/t/time-step-changing/1050/2 "2022-05-20T19:27:08Z")

</div>

Hi,

You need to change the end time in the precice-config AND in the calculix .inp file. (Probably too with the openfoam case)  
I think you forgot one of these

---

<div class="post-metadata">

**Author:** ![fatiha](https://avatars.discourse-cdn.com/v4/letter/f/bbe5ce/32.png) [@fatiha](https://precice.discourse.group/u/fatiha)\
**Post date:** [May 20, 2022, 8:27pm UTC](https://precice.discourse.group/t/time-step-changing/1050/3 "2022-05-20T20:27:51Z")

</div>

I have the same end time in all files; you can check files above.

---

<div class="post-metadata">

**Author:** ![boris-martin](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/boris-martin/32/705_2.png) [@boris-martin](https://precice.discourse.group/u/boris-martin)\
**Post date:** [May 21, 2022, 12:39pm UTC](https://precice.discourse.group/t/time-step-changing/1050/4 "2022-05-21T12:39:08Z")

</div>

You have configured a step of 0.1 in both CalculiX and preCICE, but an end time of 5 in CalculiX and 1 in preCICE (Max-Time-Windows=10, and 10\*0.1=1)  
The number of time windows must not be confused with max-iterations, set to 50, which configures the number of iterations _per time window_ in the context of implicit coupling.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/67d2a5fa6f80e597e2267ff17fa8c1673cd11caa.svg) [@system](https://precice.discourse.group/u/system)\
**Post date:** [January 2, 2024, 10:36am UTC](https://precice.discourse.group/t/time-step-changing/1050/5 "2024-01-02T10:36:12Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
