problem using paraview
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.
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.
Even though that error appears, you should still have the gradients right? If you want to compute grad(scalar) then use foamCalc instead.
check out this link
your solution is somewhere here
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 mesh for time = 0
Time = 0
Unable to process phi
No call to components for fields of type volScalarField
I don't exactly know what can i do to get gradient of a scalar field(potential).
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...
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).
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.
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:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv)
# include "createTime.H"
instantList timeDirs = timeSelector::select0(runTime, args);
# include "createMesh.H"
Info<< "Time = " << runTime.timeName() << endl;
// Check phi exists
Info<< " Reading phi" << endl;
volScalarField phi(phiheader, mesh);
Info<< " Calculating gradphi" << endl;
Info<< " No phi" << endl;
Info<< "End" << endl;
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...
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.
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...
|All times are GMT -4. The time now is 08:50.|