|
[Sponsors] |
February 29, 2020, 08:48 |
Paraview visualization of nonfield variables
|
#1 |
Member
Robin Kamenicky
Join Date: Mar 2016
Posts: 74
Rep Power: 11 |
Hi Foamers,
I would like to visualize, in Paraview, values which are written within field directories in each time directory but are not fields. These values are calculated during the calculation of the fields. The following is an example: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1906 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0.001/water"; object alphat.liquid; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -1 0 0 0 0]; internalField nonuniform List<scalar> 100 ( 0.000291513836124 0.000291732279098 0.000292002326745 0.000292285155513 0.000292572372769 0.000292860859509 0.000293149066282 0.000293435829871 0.000293720359745 0.000294001836889 0.000294279667505 0.000294553165832 0.000294821832809 0.000295085075366 0.00029534246604 0.000295593497216 0.000295837809436 0.000296074979239 0.000296304716466 0.000296526680684 0.000296740652406 0.000296946371924 0.000297143690182 0.000297332424413 0.000297512493708 0.000297683787043 0.000297846287458 0.00029799994925 0.000298144813679 0.000298280893044 0.00029840828 0.000298527036962 0.000298637300521 0.000298739175111 0.000298832833561 0.00029891841433 0.000298996118884 0.00029906611209 0.000299128616811 0.000299183817282 0.000299231951092 0.00029927321552 0.000299307856904 0.000299336078337 0.000299356143538 0.000299362119938 0.000299357462191 0.000299347583593 0.000299332841047 0.000299313622513 0.000299290076003 0.000299262514729 0.00029923116796 0.000299196196834 0.000299157805328 0.000299116143845 0.00029907140494 0.000299023729565 0.000298973295207 0.000298920232476 0.000298864705288 0.000298806834004 0.000298746769351 0.000298684621613 0.000298620528903 0.000298554591695 0.000298486936192 0.000298417653391 0.000298346858392 0.000298274633087 0.000298201082325 0.000298126279304 0.00029805031949 0.000297973267822 0.000297895211231 0.000297816206851 0.000297736333904 0.000297655642177 0.000297574203951 0.000297492062141 0.0002974092828 0.000297325902442 0.00029724198154 0.00029715755068 0.000297072665338 0.00029698735064 0.000296901657583 0.000296815606288 0.000296729243737 0.000296642585488 0.000296555674906 0.000296468523422 0.000296381171131 0.000296293625751 0.000296205924406 0.000296118071502 0.000296030101449 0.000295942015718 0.000295853846224 0.000295765591866 } symmetric { type symmetry; } maxX { type compressible::alphatPhaseChangeJayatillekeWallFunction; Prt 0.85; Cmu 0.09; kappa 0.41; E 9.8; dmdt uniform 0; value nonuniform List<scalar> 20 ( 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ) ; } minY { type compressible::alphatPhaseChangeJayatillekeWallFunction; Prt 0.85; Cmu 0.09; kappa 0.41; E 9.8; dmdt uniform 0; value nonuniform List<scalar> 20 ( 4.64026621353e-05 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ) ; } emptyPatch { type empty; } water_to_solid { type compressible::alphatWallBoilingWallFunctionCustomized; phaseType liquid; relax 0.5; partitioningModel { type Lavieville; alphaCrit 0.2; } nucleationSiteModel { type LemmertChawla; } departureDiamModel { type TolubinskiKostanchuk; dRef 0.0006; dMax 0.0014; dMin 1e-06; } departureFreqModel { type Cole; } filmBoilingModel { type Bromley; Cn 0.62; } LeidenfrostModel { type constantTLeid; TLeid 550; } CHFModel { type Zuber; Cn 0.131; } CHFSubCoolModel { type HuaXu; Kburn 0.5; } MHFModel { type Jeschar; Kmhf 1; } TDNBModel { type Schroeder; kg 1; } K 4; wp 1; otherPhase gas; dmdt nonuniform List<scalar> 20 ( 199.885794969 197.704794266 196.202557315 192.510818867 187.297290573 181.233529219 174.784261958 169.097050474 163.981044404 176.596904904 312.048818805 16.9791646693 16.9882921315 16.9951451918 17.0004789021 17.0049933795 17.0089360113 17.0125017583 17.0157641494 17.0188038529 17.0216530122 ) ; regimeType nonuniform List<scalar> 20 ( 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ) ; qQuenching uniform 0; alphatConv uniform 0; value nonuniform List<scalar> 20 ( 0.000204342430235 0.000206086983442 0.000205110010742 0.000200844970131 0.000195135423679 0.000188420697113 0.000181569990364 0.000174797117615 0.000169086642242 0.000181963072815 0.000119029414377 -0.00013912395707 -0.000139162530658 -0.000139161584742 -0.000139160991467 -0.000139160306261 -0.000139158065538 -0.000139157969823 -0.000139153211954 -0.000139150777599 -0.000139148932397 ) ; } } // ************************************************************************* // Apparently, I can code OF utility or python script to make a dummy field directory called regimeTypes in each time directory. I just wonder whether there is some standardize procedure to it. Thanks, Robin |
|
September 10, 2020, 09:57 |
|
#2 |
New Member
Tobias Kienzler
Join Date: Mar 2020
Posts: 13
Rep Power: 6 |
Did you find a solution to this yet? I guess I just asked the same... How to annotate functionObjects in ParaView?
|
|
September 10, 2020, 11:52 |
|
#3 |
Member
Robin Kamenicky
Join Date: Mar 2016
Posts: 74
Rep Power: 11 |
Hi Tobias,
I made a python script to make entirely new dummy field in all time directories. |
|
September 10, 2020, 14:27 |
|
#4 |
New Member
Tobias Kienzler
Join Date: Mar 2020
Posts: 13
Rep Power: 6 |
Hi Robin, thanks for the quick reply! I guess that's one way to solve this 😅
|
|
Tags |
paraview, postprocessing, utility |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Integrate Variables using ParaView Python Shell | cfdsolver1 | ParaView | 0 | October 12, 2016 04:08 |
3d visualization using paraview | ashishsiwalkar | OpenFOAM Programming & Development | 0 | September 8, 2016 03:14 |
[General] Paraview Binary and OSPray plugin | Prapanchnair | ParaView | 0 | May 27, 2016 07:26 |
[OpenFOAM] Paraview / ParaFoam Mesh Visualization | mdgowhar | ParaView | 2 | April 17, 2016 17:11 |
Paraview 3.12 - How to compile with ffmpeg for animation | tunkers | OpenFOAM Installation | 6 | January 21, 2012 22:08 |