CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] how assign dataset in python calculator? (https://www.cfd-online.com/Forums/paraview/123205-how-assign-dataset-python-calculator.html)

immortality September 6, 2013 16:34

how assign dataset in python calculator?
 
for making a field for cells like aspect(dataset) in python calculator, whats dataset and how to set it?

wyldckat September 7, 2013 11:47

Hi Ehsan,

It took me a while to figure this one out. I ended up figuring it out after I followed this tutorial: http://www.paraview.org/Wiki/ParaVie...tiple_Datasets

In conclusion, the "dataset" is "inputs[0]".

Best regards,
Bruno

immortality September 7, 2013 11:58

1 Attachment(s)
Hi Bruno,
thanks for your consideration,
but the image doesn't show aspect ratios or area of cells.

wyldckat September 7, 2013 12:06

1 Attachment(s)
It only works on surfaces, as shown in the attached picture.

And it barely works on tetrahedral cells, because it can calculate on some cells, but not on others.

immortality September 7, 2013 15:30

thanks,then at first a plane have to be be separated by slice Filter? the cells are hexahedral.

wyldckat September 8, 2013 09:51

Quick answer: Try the filters that extract faces and surfaces. I can't remember right now which ones they are.

All I know is that the slice filter will likely create triangles that don't exist in the original mesh.

immortality September 8, 2013 11:08

1 Attachment(s)
Hi Bruno,
in the attachment the image is somewhat dark,how to resolve the shading?

wyldckat September 8, 2013 15:27

1 Attachment(s)
You have to play with the light controls, which are accessible from the menu: Edit -> View Settings. The controls are shown in the attached image.

Try changing the values and hit the "Apply" button to see the result, without closing the dialogue box.

immortality September 8, 2013 17:41

dear Bruno it seems its related to Slice selection that is dark still,I changed light parameters but it didn't become brighter.how can exit it from selection mode?

wyldckat September 9, 2013 13:58

Hi Ehsan,

Quote:

Originally Posted by immortality (Post 450539)
dear Bruno it seems its related to Slice selection that is dark still,I changed light parameters but it didn't become brighter.

Without an example case and step-by-step instructions, I'm unable to reproduce the same problem.

Quote:

Originally Posted by immortality (Post 450539)
how can exit it from selection mode?

Do you mean that it's the selection plane that the Slice widget provides, that is making it darker? There's an option on the "Display" tab on the lower left widget, that allows to not show the slice selection place.

Best regards,
Bruno

immortality September 9, 2013 14:42

yes,
do you mention "selectable"? I unchecked it without any effect.:(

wyldckat September 9, 2013 14:49

1 Attachment(s)
From your description, only the "Show Plane" option seems to fit the description, as shown in attachment. Look for the mouse pointer in the "Properties" tab.

immortality September 9, 2013 15:49

1 Attachment(s)
Bruno still its grey:(
which files I send so that could have a look in paraview?thanks.

wyldckat September 9, 2013 15:53

  1. Select the entry "WR_inviscid.foam".
  2. On the menu, choose: File -> Save Data
  3. Save as VTK file and only the current iteration.
  4. Compress the VTK file with bz2 or gzip.
  5. Then email me the compressed VTK file.

immortality September 9, 2013 16:24

1 Attachment(s)
I saved it on x-axis line as vtk.

wyldckat September 9, 2013 16:30

I think you're confusing the threads... this thread is about the problem with seeing the aspect or area in 2D or 3D.

immortality September 9, 2013 17:13

Bruno you said me to save a VTK file,but its not possible without "plot over line",there isn't any VTK format if I want to use only "save data" :confused:

wyldckat September 9, 2013 17:24

I forgot about the detail that the internal reader uses multi-block structures...
Apply the filter "Merge Blocks" to the "WR_inviscid.foam"; then with "MergeBlocks1" selected, save data to VTK.

immortality September 9, 2013 17:32

I did it.bz2 has 3MB volume and I'll mail it(maybe takes long)

wyldckat September 9, 2013 17:33

Quote:

Originally Posted by immortality (Post 450781)
I did it.bz2 has 3MB volume and I'll mail it(maybe takes long)

I won't be able to look at it today. Send it to me only tomorrow, when you have a better internet connection.

immortality September 10, 2013 15:38

Hi Bruno
it didn't attached :( is there another way?

wyldckat September 10, 2013 17:45

Hi Ehsan,
Quote:

Originally Posted by immortality (Post 450995)
it didn't attached :( is there another way?

If:
  1. You save to VTK only the slice.
  2. Then close ParaView.
  3. Then open ParaView again.
  4. Then load only the saved VTK of the slice.
Does it still have the same problem?


And if it does have the same problem, then compress this VTK file and see if it's small enough to email it to me.

Best regards,
Bruno

immortality September 11, 2013 04:56

1 Attachment(s)
Quote:

Then load only the saved VTK of the slice
after loading what should I do to see the fields?
when the "eye" icon for WR_inviscid.foam is on,the fields aren't shown and the shape of case is grey,when its on the fields can be seen but hardly(its not bright)
and althogh the file is 8(previous was 17)its bz2 compress is 4.3(complete case was 3.9!)

--------------

its the image of when WR_inviscid.foam is off and mergeSliceVTK.VTK is on

wyldckat September 11, 2013 17:16

Hi Ehsan,

This is very strange indeed. Have you tried resetting the lighting options?
Resetting the lighting is to click on the "Reset Lights" button, then on the "Apply" button, as shown in the attached image at post #8.

Another question is: if you rotate the 3D geometry, is there any point of view that gives better visibility to any surface of the geometry?

Best regards,
Bruno

immortality September 12, 2013 05:49

1 Attachment(s)
Code:

This is very strange indeed. Have you tried resetting the lighting options?
Resetting the lighting is to click on the "Reset Lights" button, then on the "Apply" button, as shown in the attached image at post #8.

I did it.:)
Quote:

Another question is: if you rotate the 3D geometry, is there any point of view that gives better visibility to any surface of the geometry?
thaaanks Bruno a lot!
I thought I had tested it before.I rotated it and back was bright! then I changed the direction of normal arrow to (0,0,-1) and it became bright!
then this problem is resolved also! :)
maybe the issue of dash in plot over lines could be solved easily too!

immortality September 12, 2013 06:34

Hi Bruno
which way to select a plane is there instead of slice so that not to make triangles?

wyldckat September 12, 2013 16:40

Quick answer: http://www.cfd-online.com/Forums/ope...tml#post372605 post #6

wyldckat September 27, 2013 20:44

Hi Ehsan,

To complement the issue on having more light on the side of a dark geometry in ParaView...
Quote:

Originally Posted by wyldckat (Post 451223)
Another question is: if you rotate the 3D geometry, is there any point of view that gives better visibility to any surface of the geometry?

There are a couple more tricks, both explained here: http://www.cfd-online.com/Forums/ope...tml#post453945 post #6
In essence:
  • One is to apply the filter "Generate Surface Normals" and turn on the option "Flip", which will make the light shine on the opposite side.
  • The other is to use Python turn off "Diffuse" lighting and to turn on "Ambient" lighting. Although it might get a bit too bright...
Best regards,
Bruno


All times are GMT -4. The time now is 20:10.