|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
raul
Join Date: Nov 2009
Posts: 13
Rep Power: 4 ![]() |
Hi,
I am new openfoam user and I am not good at programming . I intend to find grad of a scalar variable which is a solution of my computation . Initially I used a function "gradient of unstructured variable" from paraFoam but it is giving me some error.So I am trying to make my own utility to calculate gradient of scalar quantity.Now,I guess if I make a new utility i would have to compile it with my solver and for that I am following instructions given in Userguide.I mentioned utilityFunctionObjects lib name in solver/Make/options and then used wmake command from inside solver dir. I guess it goes on well and ultimately yields a messege that solver is uptodate,but when i use the new utility command name from inside case directory it says command is not found.Can anyone please tell me what exact steps I should take to compile my newly defined utility file with the intended solver.Thanks and regards, rudy. |
|
|
|
|
|
|
|
|
#2 |
|
Member
Alan Russell
Join Date: Aug 2009
Location: Boise, Idaho USA
Posts: 61
Rep Power: 4 ![]() |
Rudy,
Some searching through the OF forums will turn up a number of links to courses, tutorials, etc that cover programming and customizing applications. Here's a link that may be helpful: http://www.openfoamworkshop.org/2009...ngTutorial.pdf. A recent thread has an excellent list of links. manual/documentation/guide/tutorial/andanythingelse. Learning Foam is challenging, but it's worth the effort. Good luck, Alan |
|
|
|
|
|
|
|
|
#3 | |
|
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,814
Rep Power: 21 ![]() |
Quote:
To sum it up
Code:
volVectorField gradT = fvc::grad(T);
Code:
volScalarField gradTx
(
IOobject
(
"gradTx",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
gradT.component(vector::X)
);
Code:
gradT.write(); Code:
wmake I hope this help. Best, Alberto P.S. Simple answers to simple questions! Sometime a "search for it" simply does not work, especially for new users.
__________________
Alberto GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image. GeekoCFD 32bit - The 32bit edition of GeekoCFD. GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats. Last edited by alberto; December 13, 2009 at 00:44. Reason: Added notes on build |
||
|
|
|
||
|
|
|
#4 |
|
New Member
raul
Join Date: Nov 2009
Posts: 13
Rep Power: 4 ![]() |
Thanks a lot to both of u, I did develop my own utility to find gradient using ur instructions and it's working now...
regards, rudy |
|
|
|
|
|
|
|
|
#5 |
|
Member
Omkar Champhekar
Join Date: Nov 2009
Location: Cincinnati, Ohio
Posts: 80
Rep Power: 4 ![]() |
gradT.write(); returns a zeroGradient field for patches. But the field is non-zero in component files like gradTx. Why?
|
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 26 | January 24, 2012 12:09 |
| problem with sampling Utility in openFOAM 1.6 | carmir | OpenFOAM Post-Processing | 7 | December 6, 2011 18:47 |
| Error compile file udf | czfluent | Fluent UDF and Scheme Programming | 24 | September 26, 2009 13:24 |
| Can someone PLEASE document the development version installation | bernd | OpenFOAM Installation | 76 | November 14, 2008 21:51 |
| Help for udf compile error | richard | FLUENT | 3 | October 12, 2003 23:13 |