|
[Sponsors] |
[swak4Foam] groovyBC and funkySetFields married and got a kid named swak4Foam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 10, 2011, 05:33 |
|
#81 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Seriously: I also built a swak4foam-package for 1.7.1. The problem is that I can't distribute it via launchpad because launchpad instists (which is a good thing) to rebuild packages from the sources. To do so it has got to install openfoam171 in a virtual machine and I don't know how to do that with a package which is not on the official ubuntu-severs and not in a launchpad-PPA. And I don't have the time to repackage 1.7 (especially as the debian-directory was removed from the 1.7-git - there are stil traces of it there) BUT: if you have the sources (the version from mercurial. Probably also works with the one from SVN) you can always build your own debian package and install it locally (just make sure that your shell is set to the OF-distro that you want to build for and say "make dpkg") |
||
May 12, 2011, 11:27 |
|
#82 | |
Senior Member
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17 |
Dear Bernhard!
Thanks for your reply. I visualized the cellSet in paraFoam (supports both cellSets and zellZones) and could see that the described problem comes from my set-up and not from swak. Fortunatelly I could solve that (please see http://www.cfd-online.com/Forums/ope...tml#post307325) and the simulation runs ... but only on single CPU . When parallelizing on 4 CPUs wired things happen as it seems that decomposePar originally doesn t decompose cellSets. For that I found a patch here http://www.cfd-online.com/Forums/ope...epar-sets.html (from you). I hope it also works with OF-1.7.1, anyway I ll try out and report. Regards, Aram Quote:
|
||
May 12, 2011, 13:07 |
|
#83 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
May 12, 2011, 15:45 |
|
#84 | |
Senior Member
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17 |
Quote:
Hence, I focused on compiling the decomposeParWithSets and it seems to work for me so far thanks!! I ll report here in case of any troubles. Cheers, Aram |
||
July 1, 2011, 18:40 |
|
#85 |
Senior Member
Join Date: Mar 2009
Location: My oyster
Posts: 124
Rep Power: 17 |
Hi Bernhard,
I wouldn't be surprised if you were already busy with it but thought I'd ask anyway. Are there plans to port swak4Foam to 2.0.0? Cheers, Ziad |
|
July 1, 2011, 23:51 |
|
#86 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
http://sourceforge.net/apps/mantisbt...view.php?id=73 The comment describes what is working and how to get it. Will finish it when I rejoined the ranks of the working people (next week or so) Bernhard |
||
July 13, 2011, 20:32 |
|
#87 |
Senior Member
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20 |
Sorry I can't install the swak4you because wmake outputs
Code:
cannot find -lswak4FoamParsers
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!" |
|
July 14, 2011, 06:04 |
|
#88 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
The difference between compiler messages and Agatha Christie novels is that skipping to the last page doesn't work. The interesting stuff is in the beginning (in the compiler messages) |
||
July 22, 2011, 23:06 |
|
#89 |
Member
Santiago
Join Date: Dec 2009
Posts: 85
Rep Power: 16 |
Hi, I recently installed OF-1.6-ext alongside OF-1.6.
While using OF-1.6 I modified groovyBC and I was able to compile it by using wmake all without problems. Now, I need the functions that I created using groovyBC in OF-1.6-ext. I tried the following command: santiago@santiago-laptop:~/groovyBC$ wmake all make: *** No rule to make target `/usr/lib/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/mixedPointPatchField.H', needed by `groovyBCPointPatchFields.dep'. Stop. As I mentioned before, everything is cool while compiling under OF-1.6, but not when switching to OF-1.6-ext. Any idea of what I can do? Is it possible to even compile the "old" groovyBC stuff under 1.6-ext? I also tried by downloading swak4Foam and compiling just as I did before and I get the following: santiago@santiago-laptop:~/swak4Foam$ wmake all No simpleFuctionsObject existing. Press ENTER to continue compilation or abort and download it with the downloadSimpleFunctionObjects.sh script then when I press enter: /usr/lib/OpenFOAM-1.6-ext/lib/libgroovyBC.so shadows library that will be compiled. This might break the compilation of the utilities Set the environment variable I_KNOW_THE_RISCS if you want to continue nevertheless what do I do in this case? I would really appreciate any help. Thanks |
|
July 23, 2011, 10:07 |
|
#90 | |
Senior Member
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20 |
Quote:
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!" |
||
July 23, 2011, 13:40 |
|
#91 | |||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Solution: 'wclean all' AND rmdepall. Or use different source-directories for different OF-versions Quote:
Quote:
About the other thing: the script tests for the existence of an old-school groovyBC and warns you (because you might experience very subtle versions of DLL-hell. If you're unlucky you might notice them but your simulation results might be wrong). So either remove the lib or set the environment variable |
||||
July 23, 2011, 15:06 |
|
#92 |
Member
Santiago
Join Date: Dec 2009
Posts: 85
Rep Power: 16 |
Thanks Bernhard for your quick response. I decided to use the old groovyBC since I already modified the source code successfully while using OF-1.6.
Now, I followed your recommendation and executed 'wclean all' AND rmdepall. After that I ran "wmake all" and this time the compilation starts but it runs into an error: Make/linuxGccDPOpt/groovyBCPointPatchFields.o: In function `Foam::getFvPatch(Foam:ointPatch const&)': groovyBCPointPatchFields.C.text+0x19b8): undefined reference to `typeinfo for Foam::fvMesh' groovyBCPointPatchFields.C.text+0x1a1f): undefined reference to `Foam::fvMesh::boundary() const' groovyBCPointPatchFields.C.text+0x1a48): undefined reference to `typeinfo for Foam::fvMesh' collect2: ld returned 1 exit status make: *** [OpenFOAM.out] Error 1 The whole log is attached below. I also tried by copying the groovyBC folder and renaming it groovyBC-1.6-ext and followed the same procedure but with no luck (same error). I will really appreciate any hints on how to proceed now. Thanks again |
|
July 23, 2011, 15:43 |
|
#93 |
Member
Santiago
Join Date: Dec 2009
Posts: 85
Rep Power: 16 |
I was able to fix the problem by using wmake libso. Thanks anyway
|
|
August 26, 2011, 05:25 |
|
#94 |
Member
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16 |
Dear Bernhard,
I want to simulate the tutorial present in tutorials/incompressible/pimpleFoam/TJunctionFan with the following modification. I would like to simulate a non uniform fan, that is a fan that imposes a pressure jump dependent from the radius (supposing a circular fan). Supposing that the radius_internal=0.5 [m] and radius_external=1.6[m], I would like to give a pressure jump according to the following expression= 100 [Pa] if the cell center is coincident with the internal radius, and 500 [Pa] if the cell center is coincident with the external radius, with a parabolic variation law (let assume a your own expression) on the intermediate cells. Now the question is: can You please give me the correct expression I have to introduce in the 0/p file (using the swak4Foam tools), in place of the original expression reported below? fan_half0 { type fan; patchType cyclic; jump 100; f 2(100 -0.1); value uniform 0; } fan_half1 { type fan; patchType cyclic; jump 100; f 2(100 -0.1); value uniform 0; } where a constant pressure jump is modelled? Moreover, I also would like to model the fan swirl. That is, on fan_half1 the velocity is the same on fan_half0, but added with a swirl, that is a tangential velocity that goes from 1 [m/s] on the inner radius, up to 6 [m/s] on the external radius, once again with a parabolic variation law. I think now the 0/U file has to be changed with respect to the original one, which is fan_half0 { type cyclic; } fan_half1 { type cyclic; } Is it possible to do that? Can You kindly give me the correct expression to be introduced in the U file? Thank You, Claudio. |
|
August 26, 2011, 06:12 |
|
#95 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Examples of such groovified BCs live in swak in the groovyStandardBC-library and I gladly accept contributions there |
||
March 6, 2012, 09:39 |
|
#96 |
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16 |
Hey,
I am using swak very often for getting expressions/functions on the boundary which I define in controlDict. Thanks a lot for this useful tool! Nevertheless I have one question: Does swak work when running the simulation in parallel? I have noticed that the values for a swak expressions are different, depending on if they are computed parallel or serial.... I would appreciate a lot an answer. Kind Regards Anne |
|
March 6, 2012, 10:53 |
|
#97 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
In principle swak is parallelized ... in all places that I'm aware of, but of course something may have escaped me. If the results are completely wrong then this may be the case. If the differ only slightly (several digits behind the comma) then I would put the blame on the "Parallel computations are not exactly the same as serial ones" If you think that the problem is swak then I would appreciate a bug report at the OF-extend Mantis. With a small example case to reproduce it if possible. BTW: which OF-version are you using? |
||
March 6, 2012, 10:59 |
|
#98 |
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16 |
Hey Bernhard,
thank you for the fast answer. The first value is for example 4.4901153e-07 and the other value is 4.4901141e-07 The difference is small, but the values are small itself. I am using the version 1.7.0 Probably these are the normal differences between parallel and serial computations. I just wanted to be sure if swak is fitting for parallel computing. |
|
March 6, 2012, 11:26 |
|
#99 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
March 7, 2012, 04:35 |
|
#100 |
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16 |
Okay, that makes sense.
The magnitude of the relative error is of order e-06 (basically x* e-07) The function depends only on temperature. In fvSolution I have set T { solver smoothSolver; smoother GaussSeidel; tolerance 1e-06; relTol 1e-03; } So the error is within the tolerance. Thank you for the explanation! |
|
|
|