CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] defining more than one field in calculator (https://www.cfd-online.com/Forums/paraview/123042-defining-more-than-one-field-calculator.html)

immortality September 3, 2013 10:33

defining more than one field in calculator
 
How can define more than only one field in calculator or by any other means?
when I define a new field it replaces to older one.
I just want to change field names to more clear ones so that I can compare the results in different cases together,for example I want to name p as p_case1 in case 1 and p_case2 in case2 so that it be distinctive in graphs I want to plot later.
any help or nice idea?

Bernhard September 3, 2013 10:57

You can change the "Result Array Name" in the Calculator filter. Does that work for you?

immortality September 3, 2013 11:25

Hi Bernhard
yes that works but only for one field,I want to define another field like T_KE_lastCycle in return of T too.

Bernhard September 3, 2013 11:31

Add another calculator.

immortality September 3, 2013 12:31

5 Attachment(s)
is it possible to make new fields from current fields by any of postProcessing utilities?

edit: when I open VTK file of fields it has incorrect result in extreme x,mean 0 and .069 that shows very low numbers near zero,may there is a mistake in creating and save VTK file on a line?it should be saved as cell or point values or any other mistake?

edit 2: the range of incorrect T is clear in this wider view (3rd picture)

edit 3: VTK file are these if you want to test yourself.:):confused: (the tar.gz files)

wyldckat September 3, 2013 17:13

Greetings to all!

@Ehsan: From what I can deduce, there seems to have been an interpolation problem at the extremities of the line that was used for the "0.007464_.vtk" data.

Since you did not detail the complete list of steps you've followed for generating this data, there is nothing more I can say about this.

Good luck!
Bruno

immortality September 3, 2013 17:19

2 Attachment(s)
I defined another VTK and it resolved! its good:D but I want to know the reason,maybe I have done something that I don't know!:rolleyes:
the attached image is the result,thats so good that two graphas are the same nearly almost!too good results is a trouble itself!:p
------------------
Hi Bruno!
I saw your post after I sent above post!
but I followed these steps like previous one:
  1. open paraFoam :D
  2. after selecting the proper time snapshot,use "plot on line"
  3. File-> save data->selecting of "Legacy vtk file" format and save
I think that's all!;) (and now I managed to do what I had learnt to make a list in posts :p)

wyldckat September 3, 2013 17:37

Quote:

Originally Posted by immortality (Post 449671)
2. after selecting the proper time snapshot,use "plot on line"

How exactly did you define the line?

immortality September 3, 2013 18:08

yes it could be the cause.probably I didn't select the x direction and it remained on diagonal direction that it was by default(it was near to do this mistake sometimes)can it make that problem?

wyldckat September 4, 2013 16:05

Quote:

Originally Posted by immortality (Post 449676)
yes it could be the cause.probably I didn't select the x direction and it remained on diagonal direction that it was by default(it was near to do this mistake sometimes)can it make that problem?

You didn't answer my question. Therefore, anything is possible...

immortality September 4, 2013 16:37

Hi Bruno
well...I simply selected "X axis" in object inspector properties.

wyldckat September 4, 2013 16:57

Quote:

Originally Posted by immortality (Post 449938)
well...I simply selected "X axis" in object inspector properties.

:confused: OK... well, then the diagnosis only explains the problem on one side.
If the line was diagonal, then on one end the values would likely to not even be present. But on the other end, they should be a bit more correct... unless near the top and bottom walls, the values are so low in comparison.

You'll have to try and reproduce the same error.

But my guess is that there was a very slight change made to the positions of the extremities of the line. An error of 1.0e-7 metres would probably be more than enough.

The other possibility is if the geometry is very small, there could be some geometrical representation related errors. I vaguely remember about a situation where streamlines did not work for nano sized domains, because some of the parameters for the streamline algorithm are hard-coded for geometries of at least the millimetre range, if I'm not mistaken.

immortality September 6, 2013 10:29

Hi Bruno
I found out the cause,its related to Mesh regions!
when I select the patches and walls as well as internalMesh,the values on extremes(on the patches) are shown mistake by that exess lines goes to zero ! (I don't know why :( )

wyldckat September 7, 2013 03:45

Hi Ehsan,

Well, I had thought about that possibility that the patches were also active, but since you didn't detail about it, I ignored that possibility :p

Quote:

Originally Posted by immortality (Post 450231)
when I select the patches and walls as well as internalMesh,the values on extremes(on the patches) are shown mistake by that exess lines goes to zero ! (I don't know why :( )

There are two possibilities here:
  1. The values are the patches are indeed very low, because they can't transfer anything through them.
  2. Or the interpolation mechanism for the "Plot over Line" filter has got issues with handling data that is specified on the centre of the faces, instead of the centre of the cells.
    • Associated to this, if using "Point Data" as the source for the data to be plotted, then the problem might be because the values in the points on the patches are different from the points that originate from the internal mesh.
Best regards,
Bruno


All times are GMT -4. The time now is 23:22.