Hello Everybody!!!
A new question every week, thats how much i use ELmer.
so
Is there a way to get the change in time of a material parameter?
I have a parameter C, and iwould need dot(c) in one equation.
I was thinking if the save materials solver could also save prevvalues to a variable or could create a parameter velocity variable or something.
any hints?
thanks
bye
Franz
Change of parameter in time as variable
-
- Posts: 196
- Joined: 29 Sep 2011, 12:25
- Antispam: Yes
Re: Change of parameter in time as variable
Hi Franz,
I would try to write a UDF which does that. It would get the value of the parameter and save it. Then in the next timestep, it would get the actual value and compute its change versus the previous one, optionally divided by the time difference - in that case, it would also save the time similarly to the parameter value.
HTH,
Matthias
I would try to write a UDF which does that. It would get the value of the parameter and save it. Then in the next timestep, it would get the actual value and compute its change versus the previous one, optionally divided by the time difference - in that case, it would also save the time similarly to the parameter value.
HTH,
Matthias
-
- Posts: 196
- Joined: 29 Sep 2011, 12:25
- Antispam: Yes
Re: Change of parameter in time as variable
Hi there,
thanks for both ideas,
Mzenkers, yours will work quite good i guess, but peters would definitly be prefareble.
Peter i tried calculate velocity but i doesnt work.
I doesnt attempt to create a new variable.
After searching the source code i think i narrowed it down to the problem of the timeorder.
The timeorder of the savematerials solver is 0 and in mainutils where the "calculate velocity" keyword is checked, there is an if timeroder ==! else if timeorder==2 control.
So the timeorder should be switched to 1 i guess.
I just did that by setting
solver%timeorder=1
in the Savedata solver.
Still it doesnt work.
Now i figured out that the Variables are not the main variables of the solver.
So i guesss they are like exported variables.
and the calulate velocity only works on the main variable right?
two questions:
1) is there a way around that
2) does the setting timeorder=1 cause sideefffects?
lots of questions.
thanks
bye
Franz
thanks for both ideas,
Mzenkers, yours will work quite good i guess, but peters would definitly be prefareble.
Peter i tried calculate velocity but i doesnt work.
I doesnt attempt to create a new variable.
After searching the source code i think i narrowed it down to the problem of the timeorder.
The timeorder of the savematerials solver is 0 and in mainutils where the "calculate velocity" keyword is checked, there is an if timeroder ==! else if timeorder==2 control.
So the timeorder should be switched to 1 i guess.
I just did that by setting
solver%timeorder=1
in the Savedata solver.
Still it doesnt work.
Now i figured out that the Variables are not the main variables of the solver.
So i guesss they are like exported variables.
and the calulate velocity only works on the main variable right?
two questions:
1) is there a way around that
2) does the setting timeorder=1 cause sideefffects?
lots of questions.
thanks
bye
Franz