
[Sponsors] 
GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh 

LinkBack  Thread Tools  Display Modes 
November 17, 2010, 08:36 

#181 
Member
Antonio Liggieri
Join Date: Aug 2010
Posts: 71
Rep Power: 7 
...problem solved!
since alphaEff = alphat (turbulent alpha) + alpha (laminar alpha), and alphat as well as alpha is defined as volsclarfield in and thus present, the groovyBC expression can be modified as follows: SURFACE_SOURCE { type groovyBC; value uniform 283; valueExpression "283"; gradientExpression "gradT"; fractionExpression "0"; variables "heatFlux=0.00000001;Cp0=1005;rho0=1.18;gradT=heat Flux/((alphat + alpha) * Cp0 * rho0);"; timelines ( ); } thanx for the hint regarding the connection of alphaEff to turbulence models  it led me to the solution! Tony 

December 3, 2010, 05:37 
groovy and turbulent boundary condition

#182 
Member

Hi bernhard,
I am using pisofoam and I want to model a three dimentional free turbulent planar jet with large eddy simulation. in inlet I want to use turbulentinlet for velocity fluctuations generation also I want to specify an equation for mean velocity with groovyBC but for each of them I must use their specific type.
can I use both of them at the same time? what I must specify as "type"? I would appreciate any help sincerely yours 

December 3, 2010, 10:12 

#183  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,972
Rep Power: 41 
Quote:


December 4, 2010, 04:20 
groovy and turbulent boundary condition

#184 
Member

>>just write a class groovyTurbulentInlet that inherits from turbulentInlet, sets the fields according to expressions then calls the superclass for the actual evaluation.
Hi Bernhard, thanks for your response. unfortunately, I have not done that yet so I would appreciate it if you could give me more details. sincerely yours, Yashar 

December 4, 2010, 04:24 

#185  
Member

Quote:
thanks for your response. unfortunately, I have not done that yet so I would appreciate it if you could give me more details. sincerely yours, Yashar 

December 6, 2010, 06:25 

#186  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,972
Rep Power: 41 
Quote:
If your average velocity doesn't chnage over time you might want to try funkySetBoundaryField from the swaksuite Bernhard 

December 6, 2010, 11:25 

#187  
Member

Quote:
thank you for your reply. I am trying to write a new boundary condition with those applications. my velocity is constant over time. do you think that funkySetBoundaryField can be used in turbulent flow? Regards, Yashar 

December 6, 2010, 17:54 

#188  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,972
Rep Power: 41 
Quote:
Have a look at the example that comes with swak Bernhard 

December 6, 2010, 22:37 

#189 
New Member
Join Date: Dec 2010
Posts: 4
Rep Power: 8 
Hey,
I am a new user of OpenFoam 1.7.1. I am interested in wave simulation using OpenFoam. I came through this groovyBC utility recently. As illustrated on the "contrib groovyBC" wiki page, I was able to download the libraries for the groovyBC case.... I dowloaded the full "groovyBC" folder in the following directory: ..../OpenFOAM1.7.1/applications/solvers/groovy/groovyBC Then I ran the "wmake libso" command; which I think worked fine as it didn't produce any error message. Now, I tried to run demo cases in the Demos folder but I couldn't. For example, for the case pulsedPitzDaily, I was able to create a mesh using blockMesh, but in the next step when I ran the simulation using oodles (application: oodles in ControlDict file) command, I found the following error: oodles: command not found I think I am doing sth wrong at this step. Please help me out....I appreciate your help in advance. Regards, Abhishek 

December 7, 2010, 15:43 

#190  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,972
Rep Power: 41 
Quote:


December 21, 2010, 08:38 

#191 
New Member
Andreas Schwärzle
Join Date: Sep 2010
Posts: 6
Rep Power: 8 
Hi,
I am trying to use the groovy BC to create an Inlet, where a uniform velocityfield should change randomly for every timestep within a certain range. Since the function randNormal() gives a random skalar field, I get a nonuniform velocity distribution. Is it possible to use rand() or randNormal() to get a single random skalar? INLET { type groovyBC; variables "uMin=0.9*vector(13,0,0);deltaU=0.2*vector(13,0,0) ;"; valueExpression "uMin+randNormal()*deltaU"; value uniform (13 0 0); } Thanks in advance for your help /Andreas 

December 22, 2010, 05:25 

#192  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,972
Rep Power: 41 
Quote:
The only way I can think of would be to (I know this means some extra computation) take the value from only one cell and use it for all. Something like (havn't tried it and I'm not quite sure whether id() is in the regular groovyBCdistro or only in the swakvariant): variables "singleRandom=max(id()==0?rand():1);"; 

January 4, 2011, 01:13 

#193 
Senior Member
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 9 
Hi, Bernhard, happy new year. Thank you for the contribution. Is the GroovyBC able to be used in OpenFOAM Version 1.7.1?
Thanks a lot, Chiven 

January 4, 2011, 06:27 

#194  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,972
Rep Power: 41 
Quote:
Bernhard 

February 1, 2011, 11:23 

#195 
Senior Member
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,164
Rep Power: 20 
I'm trying to write a boundary condition in groovyBC that requires the tangential gradient of the associated field. Is it possible to calculate a gradient on a patch face (not an snGrad)?


February 2, 2011, 10:47 

#196  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,972
Rep Power: 41 
Quote:
The only way I could think of would be to calculate the gradient for the whole field (expensive!) beforehand and then getting the patch value for that field. Calculation of that gradientField could be done with the expressionFieldfunctionObject from swak4Foam but as this is only done at the end of a timestep it will probably lag behind. So if this is an issue for you you'll probably have to modify the solver Bernhard 

February 2, 2011, 14:31 

#197 
Senior Member
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,164
Rep Power: 20 
Thanks Bernhard. I actually noticed that after posting and went on to look if I could calculate a gradient of fvPatchField in the code, but that's far from trivial. fvc::grad works on GeometricFields / volMeshes, but since patches aren't directly related to either I'd have to come up with a whole new machinery to do this. The easy way out is (just as you said) to calculate the gradient for the entire field, and that seems to be a common solution from what I found on the forums.


February 2, 2011, 17:57 

#198 
Member
Join Date: Nov 2010
Posts: 54
Rep Power: 8 
Hi
I am new to OpenFoam, and was trying to implement the groovyBC in the XiFoam/pitzDaily case, for OF 1.7.1. I installed and compiled the groovy BC, and used the following in the 0/T file (for wall heat transfer): upperWall { type groovyBC; variables "htot=100.0;Tinf=298.15;rho=2700.0;cp=900.0;k=DT*r ho*cp;"; valueExpression "Tinf"; fractionExpression "1.0/(1.0 + k/(mag(delta())*htot))"; } lowerWall { type groovyBC; variables "htot=100.0;Tinf=298.15;rho=2700.0;cp=900.0;k=DT*r ho*cp;"; valueExpression "Tinf"; fractionExpression "1.0/(1.0 + k/(mag(delta())*htot))"; } However, I got the following error: attempt to use janafThermo<equationOfState> out of temperature range 200 > 5000; T = 0 Any ideas why this could be happening? gk 

February 3, 2011, 04:36 

#199 
Senior Member
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,164
Rep Power: 20 
How did you initialize the internal field?


February 3, 2011, 08:44 

#200 
Member
Join Date: Nov 2010
Posts: 54
Rep Power: 8 
Hi
Thanks for your reply. Here is the 0/T file: dimensions [ 0 0 0 1 0 0 0 ]; internalField uniform 293; boundaryField { inlet { type fixedValue; value uniform 293; } outlet { type inletOutlet; inletValue uniform 293; value uniform 293; } upperWall { type groovyBC; variables "htot=100.0;Tinf=298.15;rho=2700.0;cp=900.0;k=DT*r ho*cp;"; valueExpression "Tinf"; fractionExpression "1.0/(1.0 + k/(mag(delta())*htot))"; } lowerWall { type groovyBC; variables "htot=100.0;Tinf=298.15;rho=2700.0;cp=900.0;k=DT*r ho*cp;"; valueExpression "Tinf"; fractionExpression "1.0/(1.0 + k/(mag(delta())*htot))"; } frontAndBack { type groovyBC; variables "htot=100.0;Tinf=298.15;rho=2700.0;cp=900.0;k=DT*r ho*cp;"; valueExpression "Tinf"; fractionExpression "1.0/(1.0 + k/(mag(delta())*htot))"; } } Please note that I have also changed frontAndBack boundary type from 'cyclic' to 'wall' so that I could give the groovyBC; the upperWall and lowerWall are also of boundary type 'wall'. When I change the BC at the walls to fixedValue (isothermal BC) simulations seem to run fine. Thanks, gk 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
FunkySetFields for OF 141  mer  OpenFOAM PreProcessing  71  June 11, 2014 11:34 
Running funkySetFields  sara  OpenFOAM Running, Solving & CFD  10  October 3, 2012 10:08 
FunkySetFields dictionary  gschaider  OpenFOAM Running, Solving & CFD  14  December 3, 2008 22:13 
FunkySetFields for cyclic bc  zakifoam  OpenFOAM PreProcessing  1  December 18, 2007 08:24 