
[Sponsors] 
April 4, 2012, 06:23 
using groovyBC toPoints?

#1 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 8 
Hello,
i read that i can use the groovyBC in meshmotion simulations, too. I try inside the pointDisplacement file the following: bottom { type groovyBC; value uniform (0 0 0); valueExpression "vector(0,toPoint(0.05*(sin(pi*time()))),0)"; } but i get the following error: > FOAM FATAL ERROR: Parser Error at "1.1016" :"syntax error, unexpected TOKEN_toPoint" "vector(0,toPoint(0.05*(sin(pi*time()))),0)" " ^^^^^^^ " From function parsingValue in file lnInclude/CommonValueExpressionDriverI.H at line 724. FOAM exiting Is it necessary to include there something or did i a mistake??? thanks in advance, rupert 

April 4, 2012, 07:36 

#2  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,972
Rep Power: 41 
Quote:
a) to construct a pointVectorField it must be "vector(toPoint(0),toPoint(0.05*(sin(pi*time()))), toPoint(0))" b) it seems that the construction of a pointVectorField is in the grammar for Fields (== funkySetFields) but not in Patches (==groovyBC) If a bugreport shows up on the OFextendMantis I will take care of point b. Point a you'll have to take care of yourself 

April 4, 2012, 08:17 

#3 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 8 
Hi,
point a i already tried, but it seems that he's not able to get the function toPoint. I tried to post it in the bugtracker; did i do it the right way? thanks a lot, rupert 

April 10, 2012, 04:34 

#4 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 8 
If anybody is interested, the problem is solved. See:
https://sourceforge.net/apps/mantisb...iew.php?id=130 

April 10, 2012, 05:14 

#5 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 8 
Hi,
now it's running without error messages but the result is not the desired one. The code only moves the points on the mesh boundary and not the mesh (using the specified meshMotion solver) himself. What I tried to get is a result like using the BC oscillatingDisplacement... can you help me? 

April 10, 2012, 05:44 

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


April 10, 2012, 07:13 

#7 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 8 
Hi,
you were right; My mistake.. regarding the compiler flag: __linux__ solved the problem with icc 

March 5, 2015, 11:57 

#8 
Senior Member
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,554
Blog Entries: 6
Rep Power: 27 
Hi all,
just one question... it the output of the face to point interpolation always there or could we suppress it? Thanks in advance,
__________________
Best regards, Tobias Holzmann Some interesting OpenFOAM tutorials, publications and videos on www.Holzmanncfd.de OpenFOAM Beginners should check out the new wiki on wiki.openfoam.com A list of some active OpenFOAM contributers can be found »here« A book about the basics of »Mathematics, Numerics, Derivations and OpenFOAM« can be found on www.Holzmanncfd.de 

January 6, 2016, 18:50 

#9 
Member
Gautami Erukulla
Join Date: Mar 2009
Posts: 56
Rep Power: 9 
P { marginbottom: 0.08in; } Hello Everybody,
I am trying to simulate a numerical wave tank using interDyMFoam solver on OpenFOAM version 2.2.0 (SuSE Linux 12.2). The idea is to generate waves by a piston wave maker, using groovy boundary condition at the inlet of the wave tank. The dynamic mesh option is specified as:
displacementLaplacianCoeffs { diffusivity uniform; } The groovyBC at the inlet is implemented as:
inlet { type groovyBC; value uniform (0 0 0); valueExpression "toFace(pointDisplacement)"; } 4. In the file “U” under the folder “0” inlet { type groovyBC; value uniform (1 0 0); valueExpression "toFace(pointDisplacement)"; } The solver for the cellDisplacement in the “fvSolution” file is GAMG. When I run the case using interDyMFOAM, I do not get any syntax errors, but the run blows up for the very first time step. In the log file it shows: Interface Courant Number mean: 0 max: 0 Courant Number mean: 0.00934266978331 max: 0.165086855307 deltaT = 0.00111111111111 Time = 0.00111111 swak4Foam: Allocating new repository for sampledGlobalVariables GAMG: Solving for cellDisplacementx, Initial residual = 1, Final residual = 9.36444116038e06, No Iterations 8 GAMG: Solving for cellDisplacementz, Initial residual = 0, Final residual = 0, No Iterations 0 Execution time for mesh.update() = 0.08 s time step continuity errors : sum local = 4.46786639335e10, global = 2.72113359451e11, cumulative = 0.000200000046943 GAMGPCG: Solving for pcorr, Initial residual = 1, Final residual = 4.75866102817e06, No Iterations 7 time step continuity errors : sum local = 0.245271051403, global = 0.243261713162, cumulative = 0.243061713115 When solving for alpha: MULES: Solving for alpha1 Phase1 volume fraction = 5.36408246329e+291 Min(alpha1) = 4.12021901801e+295 Max(alpha1) = 2.42152309773 #0 Foam::error:rintStack(Foam::Ostream&) in "/opt/OpenFOAM2.2.0/platforms/linux64GccDPOpt/lib/libOpenFOAM. The alpha values go out of bounds. I would like to mention here that if I run the same simulation with the following options, the code runs smoothly and the results seem to be good: dynamic mesh option: solver velocityComponentLaplacian; velocityComponentLaplacianCoeffs { component x; diffusivity inverseDistance (inlet); } And the groovyBC at the inlet is specified using: PointMotionUx cellMotionUx Kindly can somebody please guide me, how to resolve this issue. The reason I am trying to implement the groovyBC using pointDisplacement to pointMotion is, I would like to add a floating box in the middle of the wave tank with “sixDoFRigidBodyDisplacement” and provide it a “linearSpring” restraint. I am assuming that this can be done only in pointDisplacement. Please do let me know if I am wrong and any ideas and suggestions would be highly invaluable.Thank you. Most&More, Gautami Erukulla. 

January 7, 2016, 14:32 

#10 
Member
Gautami Erukulla
Join Date: Mar 2009
Posts: 56
Rep Power: 9 
Dear All,
It was an oversight at my end. If anyone is interested the "U" file in "0" folder should be declared as: In the file “U” under the folder “0” inlet { type movingWallVelocity; value uniform (0 0 0); } Now it works fine.Thank you. Most&More Gautami Erukulla. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
groovyBC and funkySetFields married and got a kid named swak4Foam  gschaider  OpenFOAM  164  January 13, 2015 03:52 
groovyBC elevated inlet. pos() issue  grjmell  OpenFOAM  6  January 23, 2013 09:14 
GroovyBC for 2D wave flume!  Hisham  OpenFOAM Running, Solving & CFD  13  January 20, 2012 06:04 
groovyBC and Eqn.setReference()  benk  OpenFOAM  3  June 2, 2011 08:49 
Wall heat transfer using groovyBC (XiFoam solver)  usergk  OpenFOAM  7  February 4, 2011 14:36 