Problem using swak4Foam in a modiefied solver
Dear experts,
I have written a slightly modified solver and I have problems to load the swak4Foam-Library into it. I get the following warning: Code:
--> FOAM Warning : The basic solver does not have this problem. Ideas are welcome. Thanks. Regards Bastian |
Quote:
No idea. Just some pointers (not necessarily in the correct order): - try adding libswak4FoamParsers.so to libs to see if that fails too (preferably before the other libs) - check with "file $FOAM_USER_LIBBIN/libswak4FoamParsers.so" etc that these are really libraries - make sure there are none in $FOAM_LIBBIN and $FOAM_SITE_LIBBIN (from old installations for instance) - Check if a utility that uses the swak-libraries (funkySetFields for instance) works correctly - do a complete recompile of swak4Foam (yeah. The old "programmer repairs a car"-joke) |
Hi there!! I have the same problem as bastil. I have a slightly modified solver and I have problems to load "libsimpleSwakFunctionObjects.so".
I post here the whole error message: Quote:
|
Quote:
Have you checked whether the libraries in question are in $FOAM_USER_LIBBIN (or $FOAM_SITE_LIBBIN or $FOAM_LIBBIN)? If not then swak is not properly installed (usual compilation generates these libraries in $FOAM_USER_LIBBIN) |
Thanks for your reply!! I installed swak4foam in an older OF release and it works!!
Now, as I said I have a slightly modified solver which writes my field and their gradients (written in my write.H code library), and would like to operate between fields... for instance, solve the volume integral of p*U and write this field for each time step! I had a look to the swak4foam examples but I don't know how to write the operation and probably my code writes my function gradients after than swak4foam needs them to operate. So, I am thinking of doing everything with swak4foam... could you tell me briefly how to proceed?? Thanks so much! Best! |
Quote:
Quote:
If you want to evaluate an expression and use the field later on I'd recommend the expressionSource-class in swakSourceFields. For an example of the usage see InterFoamWithSources. Basically you only have to create an option. Every time you call the ()-operator on it it gets evaluated and returns a field |
Thanks for your reply, although late...
I have already used some functionObjects both of OF and swak4foam. So, I would like to integrate an expression and regarding your pdf's on swak4foam I tried: integral { type swakExpression; valueType internalField; accumulations ( sum ); expression "U^curl(U)"; verbose true; } I want to calculate the volume integral in a transient simulation, just spatial not temporal, Am I right?? Thanks again! Best! |
Quote:
Quote:
|
Quote:
Quote:
Now, my question is how could I multiply the term "U^curl(U)" by a steady and vectorial solution that I have obtained from another field (e.g., K ) in a different case?? I would like to do the operation "(U^curl(U))&grad(K)*vol()" and accumulate the sum for integration for every time step... Thanks so much!! BEst! |
Quote:
Mind: this only gives you access to a mapped version of the foreign mesh no calculations are possible on it. So either calculate the gradient beforehand in the other case or calculate the gradient of the mapped data (which might give loss of precision/weird results) |
Quote:
Quote:
|
Quote:
Quote:
Code:
*** =funkyDoCalc= Quote:
|
Quote:
Thanks a lot, bernhard! |
problems with modified solver
Dear Foamers,
I have created a new solver called interTRFoam and, since I wish to use groovyBC, I have installed swak4Foam. Probably I did some mistakes during the installation and now I can't use my solver interTRFoam with swak4Foam. I have installed both OpenFOAM v1912 and swak4Foam with Docker, and for swak4Foam I've followed https://bitbucket.org/bgschaid/swak4...ile/src/v1906/ When I start swak4Foam I have no problem, I can move to my case folder, get blockMesh and setFields with no problem, but I cannot call my solver, only interFoam. Do you have any ideas to fix this problem? |
All times are GMT -4. The time now is 04:25. |