How to compile a new utility
Hi,
I am new openfoam user and I am not good at programming :eek:. I intend to find grad of a scalar variable which is a solution of my computation :confused:. 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. |
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. http://www.cfd-online.com/Forums/ope...thingelse.html. Learning Foam is challenging, but it's worth the effort. Good luck, Alan |
Quote:
To sum it up
Code:
volVectorField gradT = fvc::grad(T);
Code:
volScalarField gradTx
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. :D |
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 |
gradT.write(); returns a zeroGradient field for patches. But the field is non-zero in component files like gradTx. Why?
|
All times are GMT -4. The time now is 15:16. |