|
[Sponsors] |
April 4, 2012, 06:23 |
using groovyBC toPoints?
|
#1 |
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16 |
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.10-16" :"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: 4,225
Rep Power: 51 |
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 bug-report shows up on the OF-extend-Mantis 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: 16 |
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: 16 |
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: 16 |
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: 4,225
Rep Power: 51 |
Quote:
|
||
April 10, 2012, 07:13 |
|
#7 |
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16 |
Hi,
you were right; My mistake.. regarding the compiler flag: __linux__ solved the problem with icc |
|
March 5, 2015, 10:57 |
|
#8 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi all,
just one question... it the output of the face to point interpolation always there or could we suppress it? Thanks in advance,
__________________
Keep foaming, Tobias Holzmann |
|
January 6, 2016, 17:50 |
|
#9 |
Member
Gautami Erukulla
Join Date: Mar 2009
Posts: 71
Rep Power: 17 |
P { margin-bottom: 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.36444116038e-06, 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.46786639335e-10, global = -2.72113359451e-11, cumulative = -0.000200000046943 GAMGPCG: Solving for pcorr, Initial residual = 1, Final residual = 4.75866102817e-06, 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 Phase-1 volume fraction = -5.36408246329e+291 Min(alpha1) = -4.12021901801e+295 Max(alpha1) = 2.42152309773 #0 Foam::error:rintStack(Foam::Ostream&) in "/opt/OpenFOAM-2.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, 13:32 |
|
#10 |
Member
Gautami Erukulla
Join Date: Mar 2009
Posts: 71
Rep Power: 17 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] groovyBC for oscillatory flow | liybzd | OpenFOAM Community Contributions | 5 | November 12, 2018 07:53 |
[swak4Foam] reactingMultiPhaseEulerFoam problems with groovyBC | zanilu70 | OpenFOAM Community Contributions | 4 | December 13, 2016 06:46 |
[swak4Foam] Change in alpha and U with groovyBC in twoPhaseEulerFoam | dani2702 | OpenFOAM Community Contributions | 0 | November 17, 2016 03:30 |
[swak4Foam] groovyBC issue - k and epsilon | sagnikmazumdar | OpenFOAM Community Contributions | 24 | March 1, 2015 07:16 |
[swak4Foam] groovyBC and Eqn.setReference() | benk | OpenFOAM Community Contributions | 3 | June 2, 2011 08:49 |