calcFvcGrad
Hello forum users,
I just wanted to use the new FunctionObjects in OF2.2.0. For calculating a gradient field during the simulation, there is the new calcFvcGrad post-Processing FunctionObject. I added it to my controlDict and started the simulation, but I got the following error: Starting time loop Code:
--> FOAM FATAL ERROR: I appreciate any response. Best regards, Nico |
not compiled
Okay, I think this function is not compiled by default. So I added the string: "wmake $makeType fvTools" to the Allwmake file in the
$WM_PROJECT_DIR/src/postProcessing/functionObjects directory and I ran it once again. Unfortunately an error occured: Code:
wmakeLnInclude: linking include files to ./lnInclude Thanks in advance. Best Regards, Nico |
Greetings Nico,
All does seem to indicate that the "fvTools" folder wasn't ready for production in OpenFOAM 2.2.0. You can fix this by running the following commands: Code:
cd "$FOAM_SRC/postProcessing/functionObjects/fvTools" Code:
libs ("libFVFunctionObjects.so"); //this force-loads the library Bruno |
Hello Bruno,
thanks for your help. So there was just the class declaration for ployMesh missing, I did not recognize that. Now the tool is running, thanks again. :) Best regards, Nico |
Good day Wyldckat and Nico
--------------------------- SOLVED- I needed to update both the fvTools folder plus the fvTools Allmake from Github and recompile the fvTools. This also resulted in a need to update the fvSchemes file - divSchemes by adding div (U) Gauss Linear; However I would still appreciate some assistance with extracting the cross momentum values from the model. Please? ---------------------------- I have followed the above post and everything appeared to compile successfully, however when attempting to execute interFoam I received the following error output - the model was going to run but the model would not have generated the desired output. Code:
Build : 2.2.0-5be49240882f Any assistance will be greatly appreciated. Kind regards JFM |
Greetings JFM,
Quote:
Quote:
The only thing that comes to mind if force and momentum values that can be calculated with the function objects "forces" and "forceCoeffs": http://foam.sourceforge.net/docs/cpp/a09472.html You can find practical example files by running the following command: Code:
grep -islR "force" $FOAM_TUTORIALS | grep system Bruno |
convected momentum
Thank you Wyldckat
I had a look at this post plus some of the tutorials a suggested, however they do not seem to provide a method to extract the particular information I am after. The 'cross momentum' terms I am looking for are the convective derivative (momentum) terms from the LHS of the momentum equations for the conservative form of the continuum: LHS x-direction components du/dt + u.du/dx + v.du/dy + w.du/dz In particular the momentum terms (for all x, y, z) v.du/dy + w.du/dz, etc We believe these terms may potentially have a reasonable influence on the model results for my particular geometry. I also need to determine of the nonOrthogonalCorrectors are related to these terms. Any assistance or reference to similar posts will be greatly appreciated. Regards JFM. |
Hi JFM,
Those expressions look familiar to me, but I don't remember if I ever saw them explicitly in OpenFOAM :( I did a quick search and the source code of the following utility applications might help you create a variant application for calculating what you need:
edit: You might also some more information in the Programmer's Guide: http://foam.sourceforge.net/docs/Gui...mmersGuide.pdf Good luck! Best regards, Bruno |
Hello,
So after two years, I've been trying to follow this thread because the documentation about calcFvcGrad isn't clear enough for me to figure out how to do this in OF2.4.0. I think in my case the function objects loaded correctly but there is some field pointer seg fault. While I am tracing it down, hope to get some feedback from the community: controlDict: Code:
FoamFile Code:
MycalcFvcGrad Code:
Create time |
@f0208secretx: Two quick questions:
|
Quote:
2. yes. crash only occurred when I include the function object "calcFvcGrad". It seems to be a bug in the kOmegaSST model in the function "divDevReff" (roughly line 345 in kOmegaSST.C). It failed on this call " - fvc::div(nuEff()*dev(T(fvc::grad(U))))". The weird thing is, at the first time step the solver behaves correctly and gives me the velocity gradient but then the second time step it produces segfault. Still tracking the bug but would appreciate any help... |
Quote:
I found the direct cause of the crash. It is the last section in my fvSolution, which I modified from other people: Code:
cache Code:
FoamFile |
Hi f0208secretx,
I was intrigued by this crash and I've finally managed to take the time to diagnose and find a fix for this problem. The bug and fix has been reported here: http://www.openfoam.org/mantisbt/view.php?id=1828 Best regards, Bruno |
Thanks for taking your time and look into the case. I am curious about two things:
1) the operator "==" is obviously overloaded. Can you point me to a source so I can learn more? 2) does the cache block increase the computation time? by what amounts? Thanks! |
Quote:
Code:
find $FOAM_SRC/OpenFOAM -name "*.H" -type f | xargs grep "operator==" Quote:
|
Thanks. I was referring to a more complete API reference but one can always read the source code ...
Another problem I ran across that's loosely related to gradient computation/IO: I have velocity gradient output at every time step in binary, compressed format using calcFvcGrad library. I now want to write a custom binary reader to port this data for each time step to other solvers I wrote. I can't seem to find the descriptions of how this binary is formatted anywhere. I need to know precision, order of array (NCell*9 matrix), corresponding vertex/cell position etc. Will appreciate for any help. Thanks. Quote:
|
Quick answers:
Quote:
Quote:
|
Thank you so much, it really helped me!
|
coresponding coordination of gradient filed
Hello everybody,
I am wondering if I can have the location of each U gradient as well? I mean like the Ug that is written during the simulation can I have the (x,y,z) data for the corresponding gradient filed? Thanks. |
Quote:
There are several topics/strategies discussed on this thread. Can you please be more specific about which utility or function object that you thinking about? |
All times are GMT -4. The time now is 03:20. |