SimScale CAE Forum

A Quick Question

Just for completeness, the correct equations to use in this situation are:

load1: 1000((t==1)+(t==3))* //where 1000 is the magnitude of the load present at time steps 1 and 3
load2: 2000((t==2)+(t==3))* //where 2000 is the magnitude of the load present at time steps 2 and 3

The Simulation Control definition should have the following settings:
Pseudo timestepping: Stepping list
simulation interval [s]: 3
time step length [s]: 1

Each time step will contain a different load combination:
Time step 0: Gravity only
Time step 1: Gravity + Load1
Time step 2: Gravity + Load2
Time step 3: Gravity + Load1 + Load2


Hi Ben

I have tried to follow your tutorial, the run finished without an error, but when viewing it in the Post-Processor all the fields are greyed out and I can’t view the results, any ideas.


Good evening @CadManDo,

make sure you post your problem along with your project link to make things happen faster :wink:

Cheers and good luck,


1 Like

Hi jousefm

Thanks for the info, I have shared the Project with Ben, but for anyone else here is the Link:


Hi all

On re opening the project everything is working and all is fine, thanks a lot BenLewis for all your help, this is exactly what I was looking for, I will be using the Time Step on most projects, this should also cut down on Run Time.

Thanks again



Hello @BenLewis!

How ould you like set a load history which is shown below on the figure?
And would it be possible to combine the results by the following: 0.5*(Time step 3 - Time step 1)? For example if I want to see the “amplitude” of a fatigue loading.
Thanks in advance for the answer!

Bests, Csaba

Hi Casaba (@potyka_csaba),

You could use the following equations to create the desired load profiles.

Load1: F1*((t-1)*(t>1)-2*(t-2)*(t>2))*(t<3) //where F1 is the magnitude of load 1
Load2: F2*(t-3)*(t>3) //where F2 is the magnitude of load 2

The resulting load profiles are shown in the image below.

However, I’m not sure what the purpose of time step 3 is, as this is the same load case at time step 1. If time step 3 is not required you can save computation time by using the following equations.

Load1: F1*((t-1)*(t>1)-2*(t*(t-2)*(t>2))
Load2: F2*(t-2)*(t>2)

As @potyka_csaba points out below Load1 should have been:
Load1: F1*((t-1)*(t>1)-2*(t-2)*(t>2))

This eliminates the time step between the two load peaks as shown in the image below.

You can plot the difference between two load cases using the Python Calculator in ParaView. In the expression field you can use an equation like this:


input[0] = bolt pretension only
input[1] = load1 + bolt pretension

This will result in a plot that contains the effect of load1 only.

However, this is only valid if the direction of stress is substantially the same in both cases. This is because stress is a vector quantity and the difference should be calculated vectorially.

In theory this should be pretty straight forward. It is just a case of subtracting one Cauchy stress tensor from the other. The resulting Cauchy stress tensor can then be used to calculate the “von Mises stress difference”. This is not something that I’ve done but it is something that I’m interested in doing. If I get the time I may have a go at this over the next few days otherwise @rszoeke might be able to help out here.


Hello Ben! (@BenLewis)

This is a great help, thanks a lot! You might have absolutely right; “Time step 3” is not that meaningful in my question! Nevertheless I am glad that you cached what I want to ask!
And yes you are right again; it is very important to manipulate only the Cauchy stress tensors (rotation of the mean stress directions can be tricky) when combine the stress results linearly. But this is the only way to extract the amplitude stress (von Mises for example) when you will check out the fatigue loading in the critical points of the assessed part. What to do with theese amplitude stress values is an other task but it is not directly related to FEM.
I will try out what you described above as soon as I will have time for it!


Hi Csaba (@potyka_csaba),

Let me know how you go with using functions. In the meantime I’ll have a go at writing a python script to plot the difference between two stress states.

Regards, Ben

1 Like

Hello @BenLewis,

is it possible, that in the equation for Load1 there is an unnecessary “t*”?

If I would like to use a bolt pretension applying fictitious clearance: 0.0001*(t-((t-1)*(t>1))), would it mean that the pretension remains constant (not zero) after the first time step?

Bests, Csaba

Hi Csaba (@potyka_csaba),

the equation for Load1 one will ramp the load up to a maximum between time steps one and two. It will then ramp the load back to zero between time steps two and three.

Your equation for bolt pretension will work as you expect. The clearance will ramp to a maximum between time steps zero and one. It will then remain at this value for all other times steps.

If your bolts are oriented in the direction of one of the global axes (X,Y, or Z) you may find it easier to apply pretension as an “initial condition”.

With regards to displaying the “stress difference” in ParaView I have written a programmable filter. It is working well. I just need to make an example public project to demonstrate its use. Stay tuned.

1 Like

Hello @BenLewis,

the pre stress seems to be easy.
How can I create a subdomain and what should be this domain? I guess only the bolt head or nut should be excluded from the pretensioned region.Does the stress remaining then constant over the time range?
However this method has its disadvantage when I will see the change in the bolt pretension when the construction deforms.

The Python script for ParaView would be brilliant :slight_smile: Keep me update regarding to this.

PS.: In the equation below the value will became less then zero befor time step three. Or do I misunderstand something?


Hi Csaba (@potyka_csaba),

I would recommend modelling the bolt and nut as one body.

To use initial conditions you need to be using the Static analysis - advanced analysis type. You also need to have nonlinear analysis set to true.

Under Model > Initial Conditions > Stress set Type to Subdomain-based and click Save.

Under Subdomains click +New.

Set the magnitude of pre-stress for the desired direction. Select a body to apply the pre-stress (in your case, the bolt).

Click save, that’s it.

Now, at time step zero the bolt will have the applied pre-stress. At the next time step the stress in the structure will equalise. The stress in the bolt will decrease as the forces balances with the surrounding structure. You will need to experiment with the applied preload to get the actual preload you require.

I recommend adding your dynamic loading at time step two so that the effects of bolt preload can clearly be seen in time step one.

Yes, you are right. The second load equation for Load1 should have been.

Load1: F1*((t-1)*(t>1)-2*(t-2)*(t>2))

Sorry about that. Good pick up.

Yes, you are right. The second equation for Load1 is only valid for three time steps. On the other hand the first form of the equation will work for any number of time steps. It’s just slightly more complicated because of the additional (t<3) term.

Regards, Ben

Hello @BenLewis,

could you check the model why the bolt pretension drops down after the second time step?
I tried everything you mentioned excepting the initial stress state.

Thanks in advance!

Hi Csaba (@potyka_csaba),

I’ll have a look and get back to you in the next day or so.

Regards, Ben

Hi Csaba (@potyka_csaba),

I’ve taken a look at your simulation. Here are my comments.

You can find my copy of your project here

Loading Equations

Your loading equations are correct.

  • Bolt clearance: 0.0001*t*(t<=1)+0.0001*(t>1)
  • Internal pressure: 30000000*(((t-1)*(t>1))-((t-2)*(t>2)))
  • Fixed temperature: 293.15+(500*(t-2)*(t>2))

The equation for bolt clearance could also be expressed in one of the following ways:

  • 0.0001*t*((t<=1)+(t>1))
  • 0.0001*(t-(t-1)*(t>1))

All three forms are equivalent. I prefer the two alternative forms above because there is a clear distinction between the magnitude and the shape of the load (0.0001 is only used once). This just makes it less prone to mistakes when making adjustments.

It looks to me that bolt tension drops off because of the mechanics of the structure. The seal ring, between the two flanges, is fixed on both sides with a bonded contact. This means that the two flanges cannot separate when the internal pressure is introduced. Instead, the flanges rotate about the seal ring taking pressure off the bolt. The fictitious clearance is maintained, it’s just that the internal pressure is so great that it completely unloads the bolt. Replacing the bonded contact with a physical contact allows the two flanges to separate.

You can verify this by moving the the pressure and temperature loads one time step further along (see Simulation 2 - Run 1). Bolt load only drops off when the pressure load is introduced (time step 3).

Alternative approach

I’ve included an alternative approach to solve this problem (see Reactor03 FO Fine - Run 1). The main differences are:

  • Quarter model instead of full model
  • Overall finer mesh
  • Augmented Lagrange contacts instead of sliding or bonded contacts (most significant change)
  • Stress initial condition instead of fictitious clearance
  • Reduced magnitude of elastic support
  • Manual time stepping instead of automatic.

Here is a screen shot showing each time step.

With the new constraints bolt force now increased with the introduction of internal pressure. This is to be expected because the bolt preload is not enough to overcome the large internal pressure (flanges separate).

Stress Difference Plots

Here is a screen shot showing the change in stress from one time step to the next. This is useful for fatigue applications where the static stress does not contribute to the cyclic damage of the structure.

These plots were generated using a programmable filter in ParaView. I will post the code shortly.

Comments for SimScale

The results files for these simulations look odd when first opening in ParaView (see screen shot below). Using the Extract Block filter fixes the problem but this should not be necessary. Can somebody take a look at this please?

@afischer and @vdoelle, this model is very prone to the “selection bug”. You may want to take a look at this one.

Final Thoughts

This looks like a very interesting project. If I’ve misunderstood your application please let me know. I’m sure we can work out a suitable solution.

Regards, Ben


Hello @BenLewis!

It is great that you analyse this task so deeply! I will look in detail to the points you described. But first of all what kind of coloring did you used in ParaView? (I know it is a stupid question, but I like this colour setting :-)) .


Hi @potyka_csaba,

We’ve documented how to change the colors in ParaView in this post:


1 Like

Hi @potyka_csaba,

For the signed Von Mises stress field I typically use the color preset called “erdc_iceFire_H”. This works best if you scale the stress range equally in the positive and negative directions. This places zero stress in the center of the range which gets no color, compression is blue and tension is red.

Regards, Ben

Hey @potyka_csaba, adding to what @BenLewis mentioned here you can also change the ‘Number of Table Values’ in local Paraview in order to better see the change of stresses or whatever the quantity in more detail. This is mostly helpful in structural simulations and most of other commercial tools by default have a coarse contour. We are looking forward to have this feature available on online post-processor soon. Below are the example in case of temperature:

Refined table values (default):

Coarse table values (for better distribution understanding):

Hope this helps.


1 Like