Page 1 of 1

Change of behaviour of SaveScalars solver

Posted: 25 Sep 2023, 12:04
by gagliar
Dear all,

I have noticed a change in the behaviour of the "Boundary Sum" of the SaveScalars solver.

When doing

Code: Select all

Variable 2 = String "Stress Vector 1"
Operator 2 = String "Boundary Sum"
in SaveScalars solver for two boundaries (i.e. Save Scalars = Logical True in BC1 and BC3),

I was getting two outputs, one sum for BC1 and one sum for BC3 (revision: 997386b2, compilation date: 2021-06-17)
2: boundary sum: stress vector 1 over bc 1
3: boundary sum: over bc 3

whereas now (revision: 762e8f2db, compilation date: 2023-09-12), I only get one output which is the sum over the two BCs.
2: boundary sum: stress vector 1 over bc save scalars

Is there a way to get the sum separately over the two BC (the old feature)?

Regards,
Olivier

Re: Change of behaviour of SaveScalars solver

Posted: 25 Sep 2023, 17:00
by tzwinger
That is odd, since according to the history in github the most recent change in this file is 4 months old and doesn't seem to affect the described behaviour https://github.com/ElmerCSC/elmerfem/co ... calars.F90

Re: Change of behaviour of SaveScalars solver

Posted: 25 Sep 2023, 17:18
by tzwinger
Oh, I wasn't aware you had a two year old Elmer version installed.

Re: Change of behaviour of SaveScalars solver

Posted: 26 Sep 2023, 11:55
by raback
Hi Olivier,

This may have been intentional. This operator is a little problematic:

Code: Select all

Operator 2 = String "Boundary Sum"
If the two boundaries share a node what should be done about it? You have alternatives to consider it fifty-fifty in both, consider it in both, or consider it randomly in either. But the user would not know which one it is.

Of course there is no such problem if the BCs do not share a node. But you cannot have the behavior depend on that.

Since quite many years there has been the possibility to use "Mask Name i" as well which enables intentional separation. So I would perhaps not revert the operation of the code, but rather make following modifications in sif file:

Code: Select all

Solver 2
  ...
  Operator 2 = String "Boundary Sum" 
  Mask Name 2 = AA
  Mask Name 3 = BB
  ...

Boundary Condition 1 
  AA = Logical True
  ...
  
Boundary Condition 3 
  BB = Logical True
  ...
-Peter

Re: Change of behaviour of SaveScalars solver

Posted: 26 Sep 2023, 12:20
by gagliar
Hi Peter,

Thanks for the answer, I think it will solve the problem. Yes, indeed my two boundaries don't share any node and I need the sum on the two boundaries separately.

Olivier