CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] using groovyBC toPoints?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 2 Post By gschaider

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2012, 07:23
Default using groovyBC toPoints?
  #1
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16
fisch is on a distinguished road
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
fisch is offline   Reply With Quote

Old   April 4, 2012, 08:36
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by fisch View Post
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
OK. Two problems here:

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
gschaider is offline   Reply With Quote

Old   April 4, 2012, 09:17
Default
  #3
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16
fisch is on a distinguished road
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
fisch is offline   Reply With Quote

Old   April 10, 2012, 05:34
Default
  #4
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16
fisch is on a distinguished road
If anybody is interested, the problem is solved. See:

https://sourceforge.net/apps/mantisb...iew.php?id=130
fisch is offline   Reply With Quote

Old   April 10, 2012, 06:14
Default
  #5
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16
fisch is on a distinguished road
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?
fisch is offline   Reply With Quote

Old   April 10, 2012, 06:44
Default
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by fisch View Post
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?
Have you set up the cellDisplacement-field to be consistent to be consistent with the point displacement? (have a look at the movingCone-example in the swak ... as far as I remember it is done just by using toFace( ... ) )
nimasam and chathuranga like this.
gschaider is offline   Reply With Quote

Old   April 10, 2012, 08:13
Default
  #7
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16
fisch is on a distinguished road
Hi,

you were right; My mistake..

regarding the compiler flag: __linux__ solved the problem with icc
fisch is offline   Reply With Quote

Old   March 5, 2015, 11:57
Default
  #8
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
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
Tobi is offline   Reply With Quote

Old   January 6, 2016, 18:50
Default
  #9
Member
 
Gautami Erukulla
Join Date: Mar 2009
Posts: 71
Rep Power: 17
gautami is on a distinguished road
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:
  1. In the file “dynamicMeshDict” in “constant folder”
solver displacementLaplacian;
displacementLaplacianCoeffs
{
diffusivity uniform;
}


The groovyBC at the inlet is implemented as:


  1. In the file “pointDisplacement” under the folder “0”
    inlet
    {
    type groovyBC;
    value uniform (0 0 0);
    valueExpression "vector(toPoint(cos(-time())),toPoint(0),toPoint(0))";

    }
  2. In the file “cellDisplacement” under the folder “0”

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.
gautami is offline   Reply With Quote

Old   January 7, 2016, 14:32
Default
  #10
Member
 
Gautami Erukulla
Join Date: Mar 2009
Posts: 71
Rep Power: 17
gautami is on a distinguished road
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.
gautami is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] groovyBC for oscillatory flow liybzd OpenFOAM Community Contributions 5 November 12, 2018 08:53
[swak4Foam] reactingMultiPhaseEulerFoam problems with groovyBC zanilu70 OpenFOAM Community Contributions 4 December 13, 2016 07:46
[swak4Foam] Change in alpha and U with groovyBC in twoPhaseEulerFoam dani2702 OpenFOAM Community Contributions 0 November 17, 2016 04:30
[swak4Foam] groovyBC issue - k and epsilon sagnikmazumdar OpenFOAM Community Contributions 24 March 1, 2015 08:16
[swak4Foam] groovyBC and Eqn.setReference() benk OpenFOAM Community Contributions 3 June 2, 2011 09:49


All times are GMT -4. The time now is 01:14.