Why not using the FOAM framework for this with utilities foamCalc and foamCalcEx?
|
Quote:
I see in command foamCalc has div function.But is the laplacian, which is div(grad(umean)). and about first derivative of umean? I use OpenFOAm 2.1.1, I don't see foamCalcEx as you said. Could you show me clearly? Thank you, Thanh |
Hi Bernhard,
I saw your code extended of foamCalcEx on google. Thank you so much your code. Best regards, Thanh. |
When I used command foamCalc or foamCalcEx to calculate div(U) and grad(U) but I meet error. Can anyone check help me?
Code:
Selecting calcType div |
Greetings to all!
To answer the original question: there is a filter named "Compute Derivatives", but it doesn't seem to be able to calculate the laplacian. edit: In the Python Calculator, it does seem possible to use the "laplacian" function: http://www.paraview.org/Wiki/ParaVie...hon_Calculator As for the latest post: the "div(U)" entry is missing from the file "system/fvSchemes". You can find several examples for such an entry by running this command: Code:
find $FOAM_TUTORIALS -name "fvSchemes" | xargs grep "div(U)" Code:
divSchemes Best regards, Bruno |
Hi Bruno,
I thank you so much about this guide, I can calculate div(U) but grad(U) can not compute. In fvscheme has defined grad(U): Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
Selecting calcType grad |
Hi Huynh,
foamCalcEx is missing the ability to handle "grad(U)" and "div(gradU)". I've finished doing a bug report and respective patch for this here: http://code.google.com/p/foamcalcex/issues/detail?id=2 Download the patch file "changes.patch" from that bug report and place the file inside the folder "foamCalcEx". Then run: Code:
patch -p1 < changes.patch Code:
foamCalcEx grad U WARNING: I have not checked if the results given are correct. I simply did what seemed logical in the source code... and the results seemed sane enough. Best regards, Bruno |
Hi Bruno,
It worked very good. I thank you so much. Best regards, Thanh. |
Quote:
Thanh, can you let us know your experience with using this patch? |
Quote:
I have average of all these terms above by edit pisoFoam. I only prove left hand side equal to the right hand side of equation by using paraFoam, but gradient and laplacian of mean velocity does not have. So I must calculate it and using parafoam insert equation above. About the patch of Bruno, I only did following the guide of him. I added command div(U) and div(grad(U)) in fvscheme. Best regards, Thanh. |
foamCalcEx was mainly designed for quick and dirty calculation of single operations. If you want to do whole expressions like this, I would recommend funkyDoCalc.
|
Quote:
|
"grad(phi) undefined" error
Hi guys!
[EDIT]: Pffff my bad, lack of reading the error message properly.. It was referring to the multiRegion fvScheme file (in system/FluidRegion1), not the original file (system/fvScheme) which I had not defined at all yet. So, problem solved! I am quite new to OpenFOAM (so I hope this is a piece of cake for you guys ;) ) and Im modifying the electrostaticsFoam into a multiRegion solver, but Im running into a similar problem as reported. Im trying to calculate the electric field (just as they do in the original electrostaticsFoam) during createField initialization. Compiling goes well, but when I run a case I get the following error: Code:
$ electrostaticMultiRegionFoam Code:
// Initialise fluid field pointer lists Code:
/*--------------------------------*- C++ -*----------------------------------*\ Anyone any idea what may go wrong here ? Thanks, Floris |
All times are GMT -4. The time now is 05:20. |