getCapillaryStress() returns Matrix::Zero()

Bug #1308074 reported by Christian Jakob
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Fix Released
Undecided
Unassigned

Bug Description

Hi,

I noticed, that getCapillaryStress() function returns

Matrix3(0,0,0, 0,0,0, 0,0,0)

whatever the input is (getCapillaryStress(), getCapillaryStress(1), getCapillaryStress(0), getCapillaryStress(vol), ...)

In a yade version from july of last year it was working while a newer version (march 2014) is not

Can someone confirm, please?

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote : Re: [Yade-dev] [Bug 1308074] [NEW] getCapillaryStress() returns Matrix::Zero()

Hi,
The code looks ok.
Are you sure that there is at least one capillary force in the
simulation when computing the stress?
Bruno

Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

Yes, the code looks fine and there was no change in the related files during that time except splitting Shop.cpp into two files ...

also there was a change in parameter names about one year ago (Fcap <-> fCap)

Yes, I am sure, there are contacts, there are meniscii, there are capillary forces, ...

btw getStress() is working fine at the same model

chr.

Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

for reproducing see script in the attachment

btw, the link for getting capillary files is no more working:

https://yade-dem.org/index.php/CapillaryTriaxialTest

(links to https://yade-dem.org/doc/index.html)

Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

This is really strange.

I definitely got output from getCapillaryStress() with Yade 2013-07-18.git-f0b5fd0 when running scripts last year. I can proof that!
The code of getCapillaryStress() did not change between july and december 2013.
Today (or since beginning of this year) I get always

Matrix3(0,0,0, 0,0,0, 0,0,0)

whatever I do.
I ran the script at my second machine but still the output is zero.
Even when running the script with the old version ( Yade 2013-07-18.git-f0b5fd0) ...

I am helpless, can anyone confirm this behavior please?

christian

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

The problem is getStress is trying to static_cast MindlinCapillaryPhys as a CapillaryPhys while they are independant classes.
I don't think it ever worked before. I'm surprised that it doesn't simply crash. Maybe last year you were not using Mindlin law.
Or, you were very lucky and somehow the wrong cast was giving the right value since both classes have the member fCap.

Anyway, it is fixed now [1].
You can use getCapillaryStress(mindlin=True)
Note that you should give the volume argument to.

[1] https://github.com/yade/trunk/commit/84a28bebea5a8c2a772a11ccd88934e9e6ae88fe

Changed in yade:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.