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

problem using paraview

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 5, 2009, 15:59
Default problem using paraview
  #1
New Member
 
zoheb
Join Date: Mar 2009
Location: india, mumbai
Posts: 24
Rep Power: 8
zobekenobe is on a distinguished road
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.
zobekenobe is offline   Reply With Quote

Old   December 7, 2009, 10:07
Default
  #2
New Member
 
raul
Join Date: Nov 2009
Posts: 13
Rep Power: 7
rudy is on a distinguished road
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.
rudy is offline   Reply With Quote

Old   December 7, 2009, 10:14
Default
  #3
Senior Member
 
Anonymous
Join Date: Mar 2009
Posts: 110
Rep Power: 8
madad2005 is on a distinguished road
Even though that error appears, you should still have the gradients right? If you want to compute grad(scalar) then use foamCalc instead.
madad2005 is offline   Reply With Quote

Old   December 7, 2009, 10:38
Default check out this link
  #4
New Member
 
zoheb
Join Date: Mar 2009
Location: india, mumbai
Posts: 24
Rep Power: 8
zobekenobe is on a distinguished road
Motorbike Tutorial and No velocity data...

your solution is somewhere here
zobekenobe is offline   Reply With Quote

Old   December 9, 2009, 11:09
Default
  #5
New Member
 
raul
Join Date: Nov 2009
Posts: 13
Rep Power: 7
rudy is on a distinguished road
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
rudy is offline   Reply With Quote

Old   December 9, 2009, 11:38
Default
  #6
Senior Member
 
Anonymous
Join Date: Mar 2009
Posts: 110
Rep Power: 8
madad2005 is on a distinguished road
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.
madad2005 is offline   Reply With Quote

Old   December 10, 2009, 12:29
Default
  #7
New Member
 
raul
Join Date: Nov 2009
Posts: 13
Rep Power: 7
rudy is on a distinguished road
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.
rudy is offline   Reply With Quote

Old   December 15, 2009, 05:14
Default
  #8
Senior Member
 
Anonymous
Join Date: Mar 2009
Posts: 110
Rep Power: 8
madad2005 is on a distinguished road
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.
madad2005 is offline   Reply With Quote

Old   December 15, 2009, 17:35
Default
  #9
New Member
 
raul
Join Date: Nov 2009
Posts: 13
Rep Power: 7
rudy is on a distinguished road
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
rudy 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
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 22:41
Problem with Colors in ParaView sven OpenFOAM Paraview & paraFoam 1 May 31, 2009 08:13
Paraview installation troubles jjhall OpenFOAM Installation 3 April 17, 2008 12:59
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13


All times are GMT -4. The time now is 00:04.