Atom topic feed | site map | contact | login | Protection des données personnelles | Powered by FluxBB | réalisation artaban

You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

**rodrigofarias****Member**- Registered: 2020-09-03
- Posts: 61

Hi!

I am performing non-linear transient thermal simulations.

**I would like to know how to ramp the load BETWEEN loadsteps?**

As I currently do, using 'reuse=rter' and 'evol_ther' (see bellow), only the temperatures from the previous step are brought to the current step. Therefore, the temperatures obtained in the previous step start to decrease before the ramped load can 'kick in' to keep the temperatures rising.

```
...
for i in range(....)
...
rter_0 = THER_NON_LINE(reuse=rter_0,
CHAM_MATER=fmat,
CONVERGENCE=_F(ITER_GLOB_MAXI=50,
RESI_GLOB_RELA=1e-03),
ETAT_INIT=(_F(EVOL_THER=rter_0),),
EXCIT=(_F(CHARGE=loadf[i],
FONC_MULT=RAMP,),
_F(CHARGE=loadr[i],
FONC_MULT=RAMP,),
_F(CHARGE=bcs),
_F(CHARGE=linkmesh)),
...)
...
```

Other software (such as Ansys) can ramp between adjacent loads. **How to do this on Aster?**

In the attached figure, I would like to leave the 'current setup' for the 'desired setup'.

Offline

**Hanbin****Member**- From: Shanghai
- Registered: 2020-07-19
- Posts: 86

Hi

I wonder if loadf[i) is unknow at [i-1)? If not ,maybe this can be done by saving the force in last time step in a variable such as a[i-1] and add it into your ramp function ？ I want to know the answer of your question too.

Offline

**rodrigofarias****Member**- Registered: 2020-09-03
- Posts: 61

Hanbin wrote:

Hi

I wonder if loadf[i) is unknow at [i-1)? If not ,maybe this can be done by saving the force in last time step in a variable such as a[i-1] and add it into your ramp function ？ I want to know the answer of your question too.

Hi!

Yes I have the loads and results at [i-1] time. Actually I run a THER_NON_LINE before the loop for the first loadstep, and then it enters the loop to do the rest of the simulation.

How could I add the load as you say? Currently my ramp function is:

```
RAMP = DEFI_FONCTION(NOM_PARA='INST',
PROL_DROITE='CONSTANT', PROL_GAUCHE='CONSTANT',
VALE=(0.0,0.0,1.0,1.0,),)
```

Instead of ramp from 0 to 1(full load) i need to ramp from "previous_load" to 1 (my new load)...

Offline

**Hanbin****Member**- From: Shanghai
- Registered: 2020-07-19
- Posts: 86

Maybe I make a wrong expression . I don't know if loadf at time i can be known when the calculation is computing at time i-1? If not ,I don‘t know what to do.

But if you know , maybe you can change ax into a function such as 1+loadf[i/loadf[i-1.

ax=i

se=DEFI_FONCTION(

NOM_PARA='INST' ,

VALE=( 0, ax,2,0 ),

);

*Last edited by Hanbin (2021-08-28 21:41:57)*

Offline

**mf****Member**- Registered: 2019-06-18
- Posts: 376

Hello,

if you know your loads before the simulation, why don't you use one single FONC_MULT? Something like:

RAMP = DEFI_FONCTION(NOM_PARA='INST',

PROL_DROITE='CONSTANT', PROL_GAUCHE='CONSTANT',

VALE=(0.0,0.0,1.0,0.75,2.0,1.0,3.0,0.85,4.0,0.0,),)

I just guessed the factors by eye in your diagram, if you normalize all values to the second step (largest value), you'll get factors similar to this. You'll only need one single loadf (at least for loadf, I dont know if loadr is different. If so, you'd need a second RAMP2 for loadr) instead of many loadf(i).

I don't know if I am missing something, but that should work.

Mario.

Offline

**rodrigofarias****Member**- Registered: 2020-09-03
- Posts: 61

Hanbin wrote:

But if you know , maybe you can change ax into a function such as 1+loadf[i/loadf[i-1.

I think this would be the best approach, but there is a catch.

mf wrote:

Hello,

I just guessed the factors by eye in your diagram, if you normalize all values to the second step (largest value), you'll get factors similar to this. You'll only need one single loadf (at least for loadf, I dont know if loadr is different. If so, you'd need a second RAMP2 for loadr) instead of many loadf(i).

Mario.

Thanks to the 2 for the answers.

loadf and loadr are different. The Hanbin approach could solve the problem. Attached an example with fictional values. Using the equation 1+(load(i-1) - (load(i))/load(i), I get exactly how much I have to multiply the current load so that the ramp continues from previous value to current value. This is a example of the FONCTION that may **work in other cases**:

```
RAMP = DEFI_FONCTION(NOM_PARA='INST',
PROL_DROITE='CONSTANT', PROL_GAUCHE='CONSTANT',
VALE=(0.0,1+(load[i-1] - (load[i])/load[i],
1.0,1.0,),)
```

With this approach, to apply the load of 120 (coming from the load of 90), we would have, using the equation:

```
(0.0,90,
1.0,120)
```

However, **I don't have the exact numerical values** of my loads. They come from a FORMULE, which is applied to a group of elements via AFFE_CHAR_THER_F. When I try to print the values of loadf in python, it only returns an **Aster object in python** (see attachment), not the numeric values for me to calculate the ramp load. So, it doesn't seem to be possible to use the equation for my case. Here a more complete sample of my code:

```
RAMP = DEFI_FONCTION(NOM_PARA='INST',
PROL_DROITE='CONSTANT', PROL_GAUCHE='CONSTANT',
VALE=(0.0,0.0,1.0,1.0,),)
for i in range(....)
...
eqf[i] = FORMULE( NOM_PARA=('X','Y','Z', ),
VALE='my_equation',...)
loadf[i] = AFFE_CHAR_THER_F(MODELE=model,
SOURCE=_F(GROUP_MA=(my_group[i], ),
SOUR=eqf[i]),)
rter_0 = THER_NON_LINE(reuse=rter_0,....
```

Thanks for replying guys! **Do you have any other suggestions?****Would be possible to return the numerical values of the AFFE_CHAR_THER_F?**

Other thing: I used PROL_DROITE='LINEAIRE', PROL_GAUCHE='LINEAIRE' in a test, and the temperatures got way too higher.**Is the keyword LINEAIRE to be used for the purpose of ramped loads?**

Offline

**Hanbin****Member**- From: Shanghai
- Registered: 2020-07-19
- Posts: 86

Why not print eqf？ I have not try to print eqf before， but i once tried to make a function in eqf and then use print in the Python function.You can find an example in sdnl142a.datg and.comm.I think this can give you the force directly.Maybe there will be other ways but I have not try them.

Offline

**rodrigofarias****Member**- Registered: 2020-09-03
- Posts: 61

Hanbin wrote:

Why not print eqf？ I have not try to print eqf before， but i once tried to make a function in eqf and then use print in the Python function.You can find an example in sdnl142a.datg and.comm.I think this can give you the force directly.Maybe there will be other ways but I have not try them.

I had already tried to print eqf, but the result was the same (attachment). I tried to run the sdnl142a case to see if the result would be different but I had an error.

print(eqf)

print(type(eqf))

Offline

**Hanbin****Member**- From: Shanghai
- Registered: 2020-07-19
- Posts: 86

I.think you.can set something like this

Def yourfunction()

Xxxxxxxx your function

print(yourload calculated with your function)

And then put this function in your formula as the 142a did

Offline

**rodrigofarias****Member**- Registered: 2020-09-03
- Posts: 61

Hanbin wrote:

I.think you.can set something like this

Def yourfunction()

Xxxxxxxx your function

print(yourload calculated with your function)And then put this function in your formula as the 142a did

I could use a function via def in python, however, I would still be missing the X,Y,Z variables of each element in each group to calculate the FORMULE value. These coordinates are fetched only in the AFFE_CHAR_THER_F command (where I point which group to Aster).

An alternative would be to create an array with the coordinates(centroid) of each element of each group (I don't know if it's possible to retrieve this values in Aster, but I think it can be done in the Mesh module), calculate the values directly for 'eqf' and/or 'loadf' from the previous and the current step for all elements of the group, and perhaps use an average value to calculate

`1+(load[i-1] - (load[i])/load[i])`

and use it in the ramp function....

Offline

**Volker****Member**- From: Chemnitz
- Registered: 2016-05-23
- Posts: 92

regarding you "FOR IN RANGE LOOP":

I think, if you want to reimport the last result into a new calc then

INST from last result "evol_ther" should be equal to INST from new starting THER_NON_LINE, means

your time stepping has to be INST [new start calc] = INST [last step from old calc]

Offline

**rodrigofarias****Member**- Registered: 2020-09-03
- Posts: 61

Volker wrote:

regarding you "FOR IN RANGE LOOP":

I think, if you want to reimport the last result into a new calc then

INST from last result "evol_ther" should be equal to INST from new starting THER_NON_LINE, means

your time stepping has to be INST [new start calc] = INST [last step from old calc]

Yes, but it seems that Aster already does this automatically. Below, how is my LIST_REEL and variables:

```
...
dt=tame/vsol # around 0.9 seconds
timestep=dt/50 # around 0.018 seconds
times[0] = DEFI_LIST_REEL(DEBUT=0, INTERVALLE=_F(JUSQU_A=dt,
PAS=timestep,),)
tatual = dt
for i in range(....)
...
times[i] = DEFI_LIST_REEL(DEBUT=tatual, INTERVALLE=_F(JUSQU_A=tatual+dt,
PAS=timestep,),)
tatual = tatual + dt #updates current time
```

And the result obtained after the simulation is this (for 3 loads):

```
# Commande No : 0016 Concept de type : listr8_sdaster
# ------------------------------------------------------------------------------------------
times_0 = DEFI_LIST_REEL(DEBUT=0,
INTERVALLE=_F(JUSQU_A=0.8998200359928015,
PAS=0.017996400719856028,),INFO=1,)
# ------------------------------------------------------------------------------------------
# Commande No : 0022 Concept de type : listr8_sdaster
# ------------------------------------------------------------------------------------------
times_1 = DEFI_LIST_REEL(DEBUT=0.8998200359928015,
INTERVALLE=_F(JUSQU_A=1.799640071985603,
PAS=0.017996400719856028,),INFO=1,)
# Commande No : 0028 Concept de type : listr8_sdaster
# ------------------------------------------------------------------------------------------
times_2 = DEFI_LIST_REEL(DEBUT=1.799640071985603,
INTERVALLE=_F(JUSQU_A=2.699460107978404,
PAS=0.017996400719856028,),INFO=1,)
```

As you can see, times_1 has its DEBUT exactly at the end of times_0 (JUSQU_A) and so on.

Was that your concern? That maybe I might not be reusing the right instant?

Offline

**rodrigofarias****Member**- Registered: 2020-09-03
- Posts: 61

Volker wrote:

I think, if you want to reimport the last result into a new calc then

INST from last result "evol_ther" should be equal to INST from new starting THER_NON_LINE, means

your time stepping has to be INST [new start calc] = INST [last step from old calc]

Just to give you an update, I tested this modification:

```
rter_0 = THER_NON_LINE(reuse=rter_0,
ETAT_INIT=(_F(EVOL_THER=rter_0,
INST=tatual), # <--- added this line to ensure it uses the last computed time
...
```

And the results were the same. So it looks thats the default for Aster in this type of situation using 'reuse' and 'evol_ther'.

Offline

Pages: **1**