|
[Sponsors] |
[swak4Foam] Problem using swak4Foam in a modiefied solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 2, 2011, 03:39 |
Problem using swak4Foam in a modiefied solver
|
#1 |
Senior Member
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20 |
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 : From function dlLibraryTable::open(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96 could not load "libsimpleSwakFunctionObjects.so" --> FOAM Warning : From function dlLibraryTable::open(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96 could not load "libswakFunctionObjects.so" The basic solver does not have this problem. Ideas are welcome. Thanks. Regards Bastian Last edited by bastil; December 2, 2011 at 05:02. |
|
December 2, 2011, 07:26 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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) |
||
July 27, 2013, 14:05 |
|
#3 | |
Member
Join Date: Jun 2011
Posts: 80
Rep Power: 15 |
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:
|
||
July 29, 2013, 14:07 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request Last edited by gschaider; July 29, 2013 at 14:09. Reason: Message warped by connection interruption |
||
July 30, 2013, 16:39 |
|
#5 |
Member
Join Date: Jun 2011
Posts: 80
Rep Power: 15 |
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! |
|
July 31, 2013, 09:00 |
|
#6 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|||
September 4, 2013, 08:17 |
|
#7 |
Member
Join Date: Jun 2011
Posts: 80
Rep Power: 15 |
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! |
|
September 4, 2013, 09:18 |
|
#8 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
The reply was a day after your question. Why is that late? Or do you mean your reply?
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
September 4, 2013, 13:11 |
|
#9 | ||
Member
Join Date: Jun 2011
Posts: 80
Rep Power: 15 |
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! |
|||
September 4, 2013, 13:54 |
|
#10 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
September 4, 2013, 15:16 |
|
#11 | ||
Member
Join Date: Jun 2011
Posts: 80
Rep Power: 15 |
Quote:
Quote:
|
|||
September 4, 2013, 16:27 |
|
#12 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
Code:
*** =funkyDoCalc= Evaluates expressions that are listed in a dictionary using data that is found on the disc and prints summarized data (min, max, average, sum) to the screen As the mesh is the same the easiest solution is to just copy the field files into the case you're investigating
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|||
September 5, 2013, 12:43 |
|
#13 | |
Member
Join Date: Jun 2011
Posts: 80
Rep Power: 15 |
Quote:
Thanks a lot, bernhard! |
||
April 18, 2020, 16:17 |
problems with modified solver
|
#14 |
New Member
Elisa
Join Date: Jul 2018
Location: Genova, Italy
Posts: 1
Rep Power: 0 |
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? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mesh.update problem in a new FSI solver | ICL | OpenFOAM | 0 | October 8, 2011 15:16 |
Compilation problem after modifying a solver. | PetSul | OpenFOAM Running, Solving & CFD | 2 | October 1, 2009 18:28 |
patching problem unsteady solver | yellow-stuff | Main CFD Forum | 0 | September 25, 2009 02:26 |
Coupled solver energy equation problem | lucioantonio | FLUENT | 0 | April 3, 2009 11:21 |
Mashing Problem? | ji | CFX | 2 | April 4, 2002 06:03 |