How to plot scalars at edge using arc lengths

Numerical methods and mathematical models of Elmer
Post Reply
Takala
Posts: 186
Joined: 23 Aug 2009, 23:59

How to plot scalars at edge using arc lengths

Post by Takala »

Hi,

I want to plot scalars in a file, I don't want to get the coordinates but the arc-lengths on the edge. Is it possible to plot scalars at edges and is it possible to get the arc length?

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

Re: How to plot scalars at edge using arc lengths

Post by raback »

Hi Eelis,

SaveLine can plot data on boundaries as well as save data in synthethic polylines. However, SaveLine does not support computation of arc lengths. You could use the coordinate values to compute them afterwards.

There is an undocumented hack to get the nodal weight resulting from standard integration. This may be usefull if one wants to exchange between discrete and continous system. For example, after computing the nodal loads from discrete data one may change them back to distributions by dividing with the weight. To activate this the speficic solver should introduce on additional variable with the suffix ' Weights'. For example,

Exported Variable 1 = Potential Weights

If the solver is active in the bulk this return the share volume that the node represents. Now, if you would have a solver that would be active only at the boundary line this would to my understanding return the length of the arc presented by the node. The variable could then be treated in normal way. If this does not work as you would like to see subroutine CalculateNodalWeights for more info. As said this was just a hack but could perhaps be used in your case as well.

BR, Peter
Takala
Posts: 186
Joined: 23 Aug 2009, 23:59

Re: How to plot scalars at edge using arc lengths

Post by Takala »

Mortonki,

Thanks for the help. I was trying to use the polyline thing, but it didn't work. It runs and I get the file, but there is nothing in it. Here is my piece of sif:

Code: Select all

Solver 2
  Equation = SaveScalars
  Procedure = "SaveData" "SaveLine"
  Polyline Coordinates(4,3) = 0 0 0 0.0001 0.0001 0.0001 0.0002 0.0002 0.0002 0.0003 0.0003 0.0003
  FileName = curve.dat
End
Could you tell me how this should be used. And is there a maximum amount of points that one can put at the polyline.
raback
Site Admin
Posts: 4823
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: How to plot scalars at edge using arc lengths

Post by raback »

The syntax you wrote should work. Are you sure that the two line segments you define really go through some element faces? In 2D you should just define the x and y coordinates and the lines should go through element edges. There has been cases when the subroutine has not worked that well. These are typically related to cases where the defined line is a tangent to the face or edge and finding an the point of intersection may not be successful. But in the case of clear cuts the routine should work as intended, I hope.

BR, Peter
Post Reply