Page 1 of 1

Passive condition

Posted: 25 Jan 2018, 14:12
by fgillet
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

Re: Passive condition

Posted: 26 Jan 2018, 00:02
by raback
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

Re: Passive condition

Posted: 02 Feb 2018, 14:00
by fgillet
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

Re: Passive condition

Posted: 05 Feb 2018, 14:08
by Juha
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