|
[Sponsors] |
December 5, 2009, 15:59 |
problem using paraview
|
#1 |
Member
zobekenobe
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 72
Rep Power: 17 |
i have created a solver of my own by simply modifying a tutorial case set-up, after running the case and opening paraview for post processing i cant get to view the new variables.i have created a new a variable T (temp) but i can only see the results of p and U and not T.
how do i solve this problem. |
|
December 7, 2009, 10:07 |
|
#2 |
New Member
raul
Join Date: Nov 2009
Posts: 13
Rep Power: 16 |
Hi,
I am using Electrostatic solver and in my solution i have got potential and charge density distribution in my domain but now I want to find gradient of the potential distribution(electric field) and I am using "gradient of unstructured dataset" function from parafoam for the purpose but while applying this function in parafoam it stops inbetween and yields the following error: Generic Warning: In /home/dm2/henry/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkMath.cxx, line 1645 Unable to factor linear system can anyone tell me what does it imply and how to solve it. Thanks, rudy. |
|
December 7, 2009, 10:14 |
|
#3 |
Senior Member
Anonymous
Join Date: Mar 2009
Posts: 110
Rep Power: 17 |
Even though that error appears, you should still have the gradients right? If you want to compute grad(scalar) then use foamCalc instead.
|
|
December 7, 2009, 10:38 |
check out this link
|
#4 |
Member
zobekenobe
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 72
Rep Power: 17 |
||
December 9, 2009, 11:09 |
|
#5 |
New Member
raul
Join Date: Nov 2009
Posts: 13
Rep Power: 16 |
To madad2005:
Yes,it gives me the output error messege and also gives the gradient but looking at the result for gradient i have a doubt that it's not correct or may be not computed till end,I don't know but have some reasons to believe it so I want to confirm the result of potential gradient...so I tried using foamCalc,but it doesn't seem to work and rightly so as i think it is meant to give scalar components of vector fields while my variable potential is a scalar and i want to find its gradien...by the way i applied it and got the following messege: $ foamCalc components phi but it gives the following error messege: Create time Create mesh for time = 0 Time = 0 Unable to process phi No call to components for fields of type volScalarField FOAM exiting I don't exactly know what can i do to get gradient of a scalar field(potential). To zobekenobe: Can u be bit more specific please... i tried to run foamToVTK which worked and then I open parafoam from case dir,but still i get the same solution.I don't know what difference this has made... thanks to both of u... rudy |
|
December 9, 2009, 11:38 |
|
#6 |
Senior Member
Anonymous
Join Date: Mar 2009
Posts: 110
Rep Power: 17 |
Yeah, I keep forgetting about that. You'll have to write your own utility to get the grad of a scalar. See these slides by H. Jasak for guidlines how to do so (Walk Through a Post-Utility slides 11/12).
http://powerlab.fsb.hr/ped/kturbo/Op...ngTraining.pdf You'll be reading a volScalarField and returning a volVectorField. The command for getting the gradient is fvc::grad(<your varname here>) I think. It is usually best to just copy a utility that already exists and hack the code as you need it. Good luck with it anyways. p.s. From my experience, the gradients in ParaView are qualitively good. |
|
December 10, 2009, 12:29 |
|
#7 |
New Member
raul
Join Date: Nov 2009
Posts: 13
Rep Power: 16 |
Thanks adriano,but I tried to make my own utility file as u said above but when i try to run from inside casefile it gives the following error:
No command 'grad' found, did you mean: Command 'glrad' from package 'radiance' (universe) Command 'trad' from package 'radiance' (universe) Command 'grap' from package 'grap' (universe) Command 'rad' from package 'radiance' (universe) grad: command not found I have generated a new utility named grad in utilities/postprocessing/grad which is as follows: #include "fvCFD.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { timeSelector::addOptions(); #include "setRootCase.H" # include "createTime.H" instantList timeDirs = timeSelector::select0(runTime, args); # include "createMesh.H" forAll(timeDirs, timeI) { runTime.setTime(timeDirs[timeI], timeI); Info<< "Time = " << runTime.timeName() << endl; IOobject phiheader ( "phi", runTime.timeName(), mesh, IOobject::MUST_READ ); // Check phi exists if (phiheader.headerOk()) { mesh.readUpdate(); Info<< " Reading phi" << endl; volScalarField phi(phiheader, mesh); Info<< " Calculating gradphi" << endl; volVectorField gradphi ( IOobject ( "gradphi", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedVector ( "gradphi", phi.dimensions()/dimLength, vector::zero ) ); forAll(gradphi.boundaryField(), patchi) { gradphi.boundaryField()[patchi] = -phi.boundaryField()[patchi].snGrad(); } gradphi.write(); } else { Info<< " No phi" << endl; } } Info<< "End" << endl; return 0; } I just modified the utility file wall/wallGradU/wallGradU.C accordingly...I am not really good at programming so if u have any idea where i m making a mistake please let me know... thanks, rudy. |
|
December 15, 2009, 05:14 |
|
#8 |
Senior Member
Anonymous
Join Date: Mar 2009
Posts: 110
Rep Power: 17 |
Sorry for not replying sooner, but I'm really busy in the run up to Xmas. I have a code that will do this but it is at home on my laptop. I can e-mail it to you later on and/or post it here. If you have managed to get it working, then let me know.
|
|
December 15, 2009, 17:35 |
|
#9 |
New Member
raul
Join Date: Nov 2009
Posts: 13
Rep Power: 16 |
I have something which finds gradient now,following someone's instructions I made a .H file in the case directory and then included it in my main solver .C file(similar to the laplacianfoam solver)...But if u followed a different procedure to find a gradient please let me know,I would like to know new way as well...
thanks a lot... rudy |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
paraFoam reader for OpenFOAM 1.6 | smart | OpenFOAM Installation | 13 | November 16, 2009 22:41 |
[OpenFOAM] Problem with Colors in ParaView | sven | ParaView | 1 | May 31, 2009 09:13 |
Paraview installation troubles | jjhall | OpenFOAM Installation | 3 | April 17, 2008 13:59 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |