Passive condition

Clearly defined bug reports and their fixes
Post Reply
fgillet
Posts: 38
Joined: 30 Sep 2010, 16:58

Passive condition

Post by fgillet » 25 Jan 2018, 14:12

Hello,

Dirichlet conditions for passive elements (set with the keywords VarName Condition Passive = Logical in Body Forces) are not taken into account anymore due to changes in how Dirichlet conditions are set.

Lines 4700 to 4728 of SolverUtils.F90 take care of the matrix entries for the passive elements and enforce the previous values as Dirichlet conditions; However, Dirichlet conditions in the body forces are set before this;

To my understanding, the lines 4714-4719

Code: Select all

s=0._dp
DO l=1,NDOFs
    m=NDOFs*(k-1)+l
   s=s+ABS(A % Values(A % Diag(m)))
END DO
IF (s>EPSILON(s)) CYCLE
are a test to check if a node belonging to a passive element, is either:
- also belonging to an active element
- already had Dirichlet conditions applied within the body forces with the keyword VarName Condition Passive = Logical

However, this test will not work anymore in case Dirichlet conditions have been already set as the matrix values for dirichlet conditions are now applied after this.

I think that adding the test:

Code: Select all

IF (A % ConstrainedDOF(m)) CYCLE
line 4722, just before

Code: Select all

CALL SetSinglePoint(k,l,Solver % Variable % Values(m),.FALSE.)
will solve the issue; but there is maybe other subtilities.

fabien

raback
Site Admin
Posts: 3264
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Passive condition

Post by raback » 26 Jan 2018, 00:02

Hi Fabien

That's bad. Sorry about that. Tests didn't get this. Perhaps there is no test case for passive elements. Perhaps you would have some minimal case to test against.

-Peter

fgillet
Posts: 38
Joined: 30 Sep 2010, 16:58

Re: Passive condition

Post by fgillet » 02 Feb 2018, 14:00

Hello Peter;

Here is two tests for the passive condition keyword.

I have been a bit confused as I get the expected behaviour for solvers with DOFs > 1 (e.g. Stokes); this is because the values for each component are set in a second round where it does not visit the section that reset the values to the previous solution.

However for solvers with DOFs = 1 (e.g. heat equation), it does what I have reported and thus does not apply the conditions set with the keyword "Varname Condition Passive = ...".

I get the expected values with the proposed fix.

cheers

fabien
Attachments
Step_stokes_passive.tar.gz
(1.28 KiB) Downloaded 29 times
PassiveCond.tar.gz
(1.2 KiB) Downloaded 30 times

Juha
Site Admin
Posts: 357
Joined: 21 Aug 2009, 15:11

Re: Passive condition

Post by Juha » 05 Feb 2018, 14:08

Hi
To my best understaning your fix is good, and I applied it to the "devel" -branch. Thanks for the
fix and sorry 'bout the breakage.
BR, juha

Post Reply