yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #12770
Re: [Question #290129]: calculation of external work
Question #290129 on Yade changed:
https://answers.launchpad.net/yade/+question/290129
Luc Scholtès proposed the following answer:
Thanks Bruno for your answer.
As I said, I probably missed something since, in the version I use, the
external work is only computed in
TriaxialStressController::controlExternalStress()
with this line:
externalWork +=
previousTranslation[wall].dot(getForce(scene,wall_id[wall]));
Then, according to these lines in TriaxialStressController::action(),
externalWork is thus computed only when the walls are stress controlled
(these are the lines for bottom wall only, the same structure applies
for all other walls):
if (wall_bottom_activated) {
if (stressMask & 2) controlExternalStress(wall_bottom, wallForce, p_bottom, max_vel2);
else p_bottom->vel[1] += (-normal[wall_bottom][1]*0.5*goal2*height -p_bottom->vel[1])*(1-strainDamping);
}
In order to have the external work computed under strain control, I had
to modify the code according to the following lines:
if (wall_bottom_activated) {
if (stressMask & 2) controlExternalStress(wall_bottom, wallForce, p_bottom, max_vel2);
else { p_bottom->vel[1] += (-normal[wall_bottom][1]*0.5*goal2*height -p_bottom->vel[1])*(1-strainDamping);
// LS: update of external work?
externalWork += (p_bottom->vel.dot(getForce(scene,wall_id[wall_bottom])))*scene->dt;
}
Without this change, I just cannot explained where the elastic energy
that is stored in my sample during the deviatoric phase is coming from.
So, 2 possibilities here:
1) I miss something conceptually for not considering these additional lines (and then no work is produced when walls are strain controlled) -> this is why I ask if I missed something
2) I use an outdated version where the external is only computed in ControlExternalStress (my version is not the latest one)
In any of these 2 cases, I just cannot verify the energy balance in my
system and I will then stick to my changes to do so.
Unless you have another explanation?
Thanks
Luc
--
You received this question notification because your team yade-users is
an answer contact for Yade.