How to Averaging the Nodal Results

The graphical user interface of Elmer
Post Reply
kanito
Posts: 9
Joined: 28 May 2018, 08:14
Antispam: Yes

How to Averaging the Nodal Results

Post by kanito »

Hi every one,
I would like to ask you for a suggestion about calculation of the Averaging the Nodal Results, in my case is Electric field.
Now, I have already known that which nodes are on the boundary (single line), but I want to know the average electric field on the boundary of the model.
Could you please tell me how can I calculate the average Electric field from the data from Node on the boundary in the .res file?

Thank you in advance
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: How to Averaging the Nodal Results

Post by mzenker »

Hi,

you can use the SaveScalars solver with the mean operator. See Models Manual for more info.
Else you can do it in the postprocessing step, e.g. using ParaView which has almost every filter you can imagine.

HTH,
Matthias
kanito
Posts: 9
Joined: 28 May 2018, 08:14
Antispam: Yes

Re: How to Averaging the Nodal Results

Post by kanito »

Hi Matthias,
Thank you very much for your help.
I ll try for it.

Thank you,
Kanito
kanito
Posts: 9
Joined: 28 May 2018, 08:14
Antispam: Yes

Re: How to Averaging the Nodal Results

Post by kanito »

Hi Matthias
I have tried to use savescalar as your suggestion, but I do not quite understand the manual that much.
Could you please suggest me for the below question?

First, I want to find the average the electric field on the boundary 6 (at this boundary, I did not set any parameter. I just want to know the nodal value on the path on the boundary 6)
p.s. My model is in 2D.


I have tried many ways
1. I put this command in the .sif file

Solver 3
Exec Solver = After Timestep
Equation = SaveScalars
Procedure = "SaveData" "SaveScalars"
Filename = "avgEfield.dat"

Variable 1 = electric field
Operator 1 = min
Operator 2 = max

Variable 2 = Potential
Operator 3 = min

End

From this command, no matter I put the below command in the .sif or not, the results is still come out with the same value.

Boundary Condition 6
Target Boundaries(1) = 6
Name = "BoundaryCondition 6"
Save Scalars = Logical True

End

2. I put the new command in the .sif file
Solver 3
Exec Solver = After Timestep
Equation = SaveScalars
Procedure = "SaveData" "SaveScalars"
Filename = "avgEfield.dat"

Variable 1 = electric field
Operator 1 = boundary mean
Operator 2 = boundary int mean

Variable 2 = Potential
Operator 3 = boundary mean
Operator 4 = boundary int mean

End

In this time, the results will be calculated just for the case that I put “Save Scalars = Logical True” in the Boundary Condition 6

Could you please explain about the difference between the above methods.?
I guess that the first method is calculated for overall data, but for the second method the data at the assigned boundary will be calculated? Is this correct?

And one more question.
Here is the results from the .dat file
9.682715257089E+001 2.673737611335E-002 1.632873005441E-002 2.673737611335E-002 1.000000000000E+000
9.682713566966E+001 2.673737623008E-002 1.632873005157E-002 2.673737623008E-002 1.000000000000E+000
9.682712917748E+001 2.673737623674E-002 1.632873002521E-002 2.673737623674E-002 1.000000000000E+000

Could you please tell me the meaning of the last column?
And I also would like to know why are there 3 rows of data, what is the meaning of each row?
Could you please suggest me for this issue?

Thank you very much in advance
Kanito




mzenker wrote: 24 Sep 2018, 18:11 Hi,

you can use the SaveScalars solver with the mean operator. See Models Manual for more info.
Else you can do it in the postprocessing step, e.g. using ParaView which has almost every filter you can imagine.

HTH,
Matthias
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: How to Averaging the Nodal Results

Post by mzenker »

Hi,

briefly, as I am short of time at the moment:
kanito wrote: I guess that the first method is calculated for overall data, but for the second method the data at the assigned boundary will be calculated? Is this correct?
Yes. See also the examples in the models manual.
kanito wrote: Could you please tell me the meaning of the last column?
I don't know, would have to see the whole sif file that produced that file.
kanito wrote: And I also would like to know why are there 3 rows of data, what is the meaning of each row?
You have declared

Code: Select all

Exec Solver = After Timestep
How many timesteps do you have?

HTH,

Matthias
kanito
Posts: 9
Joined: 28 May 2018, 08:14
Antispam: Yes

Re: How to Averaging the Nodal Results

Post by kanito »

Hello Matthias,

Thank you very much for your suggestion.
I am so sorry maybe I cannot answer for your question, I don't know much in detail about the command.
I use my colleague's .sif file, and just change for some parameter for my self.
Therefore, I am not sure about the time step that I used.
Actually, I had just copied the Exec Solver = After Timestep command in the ElmerModelsManual.pdf (I use Timestepping Method = BDF BDF Order = 1)

Now, I am learning how to use the savescalar command following the manual by changing parameter.
However, I still do not understand it clearly, so I ask you those question.
Is it possible that since I use Coordinate Mapping(3) = 1 2 3; therefore, the result of save scalar are given 3 rows of data.
I attached my .sif in this post, could you please have a look for it, and suggest me for the rest of question.

Thank you
Khanit
Attachments
case.sif
(3.68 KiB) Downloaded 315 times
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: How to Averaging the Nodal Results

Post by mzenker »

Hi,

it seems to me that one set of parameters is saved after every iteration, since you do a steady state simulation with 3 iterations.
You could have the SaveScalars solver execute "after simulation", then you should get only one line.
The numbers in the line should correspond to the operators. Why there is a 5th column with 1.0 I don't know.

HTH,

Matthias
kanito
Posts: 9
Joined: 28 May 2018, 08:14
Antispam: Yes

Re: How to Averaging the Nodal Results

Post by kanito »

Dear Matthias,

Thank you very much for the kind suggestion^^
U helped me again

Kanito
Post Reply