|
[Sponsors] |
[swak4Foam] GroovyBC: trying to set a logarithmic BC |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
|
Hello to everyone.
I am trying to set a logarithmic BC for inlet. I read in different post that it is being done by type groovyBC. The idea is that let say two regions A and B ar conected with a path and a pump, where at the inlent for the pump I want to set as a diferent profile. The velocity at the inlet is 0.5 m/s, so I tried to do this like this: Code:
inlet { type groovyBC; variables "ul=log(0.5)*normal();"; valueExpression "ul"; } Code:
--> FOAM FATAL IO ERROR: Unknown patchField type groovyBC for patch type patch What am I doing wrong? Thank you in advance. Cheers Raitis |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 ![]() |
Hello,
You have to add this to your controlDict file Code:
libs ( "libgroovyBC.so" "libgroovyStandardBCs.so" ); Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! ![]() |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
|
Dear, Alex, thank you for you reply. I did dowload the swak4Foam for my version 2.2.0 with this:
Code:
svn checkout svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_2.0/libraries/swak4Foam/ swak4Foam Code:
--> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1179 dlopen error : libgroovyBC.so: cannot open shared object file: No such file or directory --> FOAM Warning : From function dlLibraryTable::open(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99 could not load "libgroovyBC.so" --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1179 dlopen error : libgroovyStandardBCs.so: cannot open shared object file: No such file or directory --> FOAM Warning : From function dlLibraryTable::open(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99 could not load "libgroovyStandardBCs.so" Cheers Raitis |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 ![]() |
Did you compile swak4foam after downloading it?
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! ![]() |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
|
No I did not. How is it done?
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 ![]() |
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! ![]() |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Member
|
Thank you for your answer.
![]() It is compiling now hopefully it will go. Tommor I need to do that again but with OpenFOAM 1.6. WIll there be any difference? Are you willing to give me an advise for a snappyhexMesh problem I can not figure it out. I am sorry if I do not get things at first, I am new to Linux and OpenFOAM. Thank you for your time. ![]() if you are interested in the snappyHexMesh here is the link: http://www.cfd-online.com/Forums/ope...esh-walls.html Cheers Raitis |
|
![]() |
![]() |
![]() |
![]() |
#8 | ||
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 ![]() |
You're welcome!
![]() Quote:
![]() Regarding the compilation in OF 1.6, yes, it must be the same but with the proper swak4foam version downloaded from the page I posted above. Quote:
![]() Cheers, Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! ![]() |
|||
![]() |
![]() |
![]() |
![]() |
#9 |
New Member
Loïc Dagnas
Join Date: Jan 2015
Location: France
Posts: 9
Rep Power: 12 ![]() |
Hi all,
I am very new to openFoam, and I am trying to use time dependant boundary-conditions with shallowWater model. In order to do that, I am trying to use "type groovyBC", but unsuccessfully at the moment. I achieved the installation and the following code don't return error but the expression I gave to velocity with the "valueExpression" key word seems to be ignored and the velocity value seems fixed to value Here is a minimal example, with a constant value: Code:
Sea { type groovyBC; variables ( "Uu=vector(0.1,0.1,0);" ) valueExpression "Uu"; value uniform (0 0 0); } Thank you very much |
|
![]() |
![]() |
![]() |
![]() |
#10 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 ![]() |
Maybe the problem are the commas in the definition of Uu
Code:
"Uu=vector(0.1,0.1,0);"
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! ![]() |
|
![]() |
![]() |
![]() |
![]() |
#11 |
Member
|
Thank you ALex it did work, of course now I need to fix this problem:
Code:
--> FOAM Warning : From function groovyBCFvPatchField<Type>::groovyBCFvPatchField(const fvPatch& p,const DimensionedField<Type, volMesh>& iF,const dictionary& dict) in file groovyBCFvPatchField.C at line 131 No value defined for U on inlet therefore using 1500{(0 0 0)} Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting turbulence model type LESModel Selecting LES turbulence model oneEqEddy Selecting LES delta type cubeRootVol bounding k, min: 0 max: 0 average: 0 oneEqEddyCoeffs { ce 1.048; ck 0.094; } Starting time loop fieldAverage fieldAverage: Starting averaging at time 0 Time = 0.0005 Courant Number mean: 1.40731e-06 max: 0.00192308 swak4Foam: Allocating new repository for sampledGlobalVariables smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 7.94015e-09, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 8.11108e-09, No Iterations 2 smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 2.85247e-08, No Iterations 2 --> FOAM FATAL ERROR: Continuity error cannot be removed by adjusting the outflow. Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow. Total flux : 0.000173225 Specified mass inflow : 0.124766 Specified mass outflow : 0.09 Adjustable mass outflow : 0 ![]() Yes it did work, and thank you again Alex. Nice to have this kind of place where people are interested in the same kind of problems. ![]() Cheers. Raitis. |
|
![]() |
![]() |
![]() |
![]() |
#12 |
New Member
Loïc Dagnas
Join Date: Jan 2015
Location: France
Posts: 9
Rep Power: 12 ![]() |
Thank you very much Alex,
but it still doesn't work: velocity is not affected. In my opinion, the comas have to be used in swak4Foam vector syntax. Best regards Loïc |
|
![]() |
![]() |
![]() |
![]() |
#13 |
Member
|
Should there be bracets after variables?
Try like this: Code:
Sea { type groovyBC; variables "Uu=vector(0.1,0.1,0);"; //this ; here and no bracets plus try remove the comma if does not work like this. valueExpression "Uu"; value uniform (0 0 0); } |
|
![]() |
![]() |
![]() |
![]() |
#14 |
Member
|
Code:
Sea { type groovyBC; variables "Uu=vector(0.1,0.1,0);"; valueExpression "Uu"; value uniform (0 0 0); } |
|
![]() |
![]() |
![]() |
![]() |
#15 |
New Member
Loïc Dagnas
Join Date: Jan 2015
Location: France
Posts: 9
Rep Power: 12 ![]() |
Hi Raitis,
thank you for your answer, but I still have the same problem: with your code my velocity seems fixed to < value uniform (0 0 0)> with or without the comas Regards Loïc |
|
![]() |
![]() |
![]() |
![]() |
#16 | |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 ![]() |
Quote:
It's not a matter of opinion but it's a fact, the commas seem to be correctly used according to the documentation. I think that the problem may be that you missed something Code:
Sea { type groovyBC; variables ( "Uu=vector(0.1,0.1,0);"); valueExpression "Uu"; value uniform (0 0 0); } ![]() Let us know if now it works or not. Regards, Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! ![]() |
||
![]() |
![]() |
![]() |
![]() |
#17 |
Member
|
Dear Alex.
If I want to get a velocity profile of coordinates like this: Code:
inlet { type groovyBC; variables "ul=log(y)+x;"; valueExpression "ul"; } Cheers Raitis |
|
![]() |
![]() |
![]() |
![]() |
#18 | |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 ![]() |
Quote:
![]() Code:
inlet { type groovyBC; variables "ul=log(pos().y)+pos().x;"; valueExpression "ul"; }
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! ![]() |
||
![]() |
![]() |
![]() |
![]() |
#19 |
New Member
Loïc Dagnas
Join Date: Jan 2015
Location: France
Posts: 9
Rep Power: 12 ![]() |
Hi Alex,
Thank you very much for your time. It still doesn't work for my case, and I also tried your code with icoFoam cavity and shallowWater squareBump tutorials, and I obtain the same mysterious result: a velocity of (0 0 0) everywhere ... I have no idea what could be my error. Thanks Loïc PS: I attach the file 0/U I used for shallowWater squareBump case |
|
![]() |
![]() |
![]() |
![]() |
#20 |
New Member
Loïc Dagnas
Join Date: Jan 2015
Location: France
Posts: 9
Rep Power: 12 ![]() |
Hi all,
I am very new to openFoam, and I am trying to use time dependant boundary-conditions with shallowWater model. In order to do that, I am trying to use "type groovyBC", but unsuccessfully at the moment. I achieved the installation and the following code don't return error but the expression I gave to velocity with the "valueExpression" key word seems to be ignored and the velocity value seems fixed to value Here is a minimal example, with a constant value: Code:
Sea { type groovyBC; variables ("Uu=vector(0.1,0.1,0);"); valueExpression "Uu"; value uniform (0 0 0); } I also tried this code with icoFoam cavity and shallowWater squareBump tutorials, and I obtain the same mysterious result: a velocity of (0 0 0) everywhere ... I have no idea what could be my error. Thank you very much PS: I attach the file 0/U I used for shallowWater squareBump case PS2: it might unrelevant, but I am using OpenFoam2.3 |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] ICEM Scripting Issues | tylerplowright | ANSYS Meshing & Geometry | 33 | September 27, 2021 17:35 |
[swak4Foam] groovyBC set an initial unknown guess constant | ancolli | OpenFOAM Community Contributions | 2 | June 15, 2016 14:46 |
Possible bug with stitchMesh and cyclics in OpenFoam | Jack001 | OpenFOAM Pre-Processing | 0 | May 21, 2016 09:00 |
set BC mass-flow-inlet via UDF and via GUI perform different result | sawa25 | FLUENT | 1 | February 25, 2015 01:51 |
[ICEM] Question about the use of ICEM tcl scripting | lnk | ANSYS Meshing & Geometry | 9 | January 16, 2013 10:24 |