CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Paraview & paraFoam

defining more than one field in calculator

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 1 Post By Bernhard
  • 1 Post By wyldckat
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   September 3, 2013, 10:33
Default defining more than one field in calculator
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18
immortality is on a distinguished road
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?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 3, 2013, 10:57
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 13
Bernhard is on a distinguished road
You can change the "Result Array Name" in the Calculator filter. Does that work for you?
Bernhard is offline   Reply With Quote

Old   September 3, 2013, 11:25
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18
immortality is on a distinguished road
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.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 3, 2013, 11:31
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 13
Bernhard is on a distinguished road
Add another calculator.
immortality likes this.
Bernhard is offline   Reply With Quote

Old   September 3, 2013, 12:31
Default
  #5
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18
immortality is on a distinguished road
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. (the tar.gz files)
Attached Images
File Type: jpg T_correct.jpg (18.4 KB, 5 views)
File Type: jpg T)incorrect.jpg (20.0 KB, 6 views)
File Type: jpg T)incorrect.jpg (21.4 KB, 1 views)
Attached Files
File Type: gz 0.007464_.vtk.tar.gz (11.2 KB, 1 views)
File Type: gz 933.vtk.tar.gz (15.9 KB, 1 views)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.

Last edited by wyldckat; September 4, 2013 at 16:17.
immortality is offline   Reply With Quote

Old   September 3, 2013, 17:13
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,558
Blog Entries: 39
Rep Power: 97
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
__________________
wyldckat is offline   Reply With Quote

Old   September 3, 2013, 17:19
Default
  #7
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18
immortality is on a distinguished road
I defined another VTK and it resolved! its good but I want to know the reason,maybe I have done something that I don't know!
the attached image is the result,thats so good that two graphas are the same nearly almost!too good results is a trouble itself!
------------------
Hi Bruno!
I saw your post after I sent above post!
but I followed these steps like previous one:
  1. open paraFoam
  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 )
Attached Images
File Type: jpg p_lastCycle.jpg (16.8 KB, 1 views)
Attached Files
File Type: gz 0.007464.vtk.tar.gz (15.9 KB, 0 views)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.

Last edited by wyldckat; September 4, 2013 at 16:15.
immortality is offline   Reply With Quote

Old   September 3, 2013, 17:37
Default
  #8
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,558
Blog Entries: 39
Rep Power: 97
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Quote:
Originally Posted by immortality View Post
2. after selecting the proper time snapshot,use "plot on line"
How exactly did you define the line?
__________________
wyldckat is offline   Reply With Quote

Old   September 3, 2013, 18:08
Default
  #9
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18
immortality is on a distinguished road
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?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 4, 2013, 16:05
Default
  #10
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,558
Blog Entries: 39
Rep Power: 97
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Quote:
Originally Posted by immortality View Post
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...
__________________
wyldckat is offline   Reply With Quote

Old   September 4, 2013, 16:37
Default
  #11
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18
immortality is on a distinguished road
Hi Bruno
well...I simply selected "X axis" in object inspector properties.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 4, 2013, 16:57
Default
  #12
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,558
Blog Entries: 39
Rep Power: 97
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Quote:
Originally Posted by immortality View Post
well...I simply selected "X axis" in object inspector properties.
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 likes this.
__________________
wyldckat is offline   Reply With Quote

Old   September 6, 2013, 10:29
Default
  #13
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18
immortality is on a distinguished road
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 )
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 7, 2013, 03:45
Default
  #14
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,558
Blog Entries: 39
Rep Power: 97
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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

Quote:
Originally Posted by immortality View Post
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
immortality likes this.
__________________
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Temperature field to IcoFoam yapalparvi OpenFOAM Programming & Development 14 November 19, 2015 05:57
Demagnetization field jan0385 ANSYS 0 April 12, 2012 09:09
chtMultiRegionFoam - exchange data between flow field and temperature phsieh2005 OpenFOAM Running, Solving & CFD 0 February 7, 2012 10:16
Porosity field in Fluent wojciech FLUENT 1 September 20, 2010 11:19
problem with internal field and nonuniform list OFU OpenFOAM Running, Solving & CFD 1 October 5, 2009 03:35


All times are GMT -4. The time now is 12:52.