groovyBC boundary using values from another boundary
Dear all
I have been studying the groovyBC boundary condition these days.But I am confused in understanding something. The following is my inputing file for pressure p. ------------------------------------------------------------------------------------------------------- dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { SIDE { type groovyBC; value uniform 0.1; valueExpression "Pside"; variables "Pside@SIDE=p;"; } OUT { type zeroGradient; } IN { type zeroGradient; } } ---------------------------------------------------------------------------------------------------------- Does it mean that I am using the state of the fields P on the same patches(in my case it is SIDE) from the previous time-step or iteration to evaluating the pressure expression in run-time? According the original description from website http://openfoamwiki.net/index.php/Contrib_groovyBC "groovyBC provides the ability to access fields from remote patches (other patches present within the current simulation). When evaluating the expression in run-time, the state of the fields on the remote patches from the previous time-step or iteration are utilised." Have I understood it correctly? Thank you for your suggestion! lg88 |
Quote:
Newer versions of groovyBC have the possiblity to access the p from the last time with "oldTime(p)". Form the @ in your remote patch-access I deduce that you're using a non-swak4Foam version of groovyBC (the syntax there is different). "oldTime" won't work there anyway |
Hi gschaider
I have installed swak4Foam in my computer for the purpose of using function 'oldTime'.I need the calculated value of the last time not the average value.So I have changed my inputing P file as follow: ---------------------------------------------------------------------------------------------------- dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { SIDE { type groovyBC; value uniform 0.1; valueExpression "Pside"; variables "Pside{SIDE}=oldTime(p);"; } OUT { type zeroGradient; } IN { type zeroGradient; } } ----------------------------------------------------------------------------------------------------------------- But when I run my case,it came out some warnings as: Code:
--> FOAM Warning : Regards! lg88 |
Quote:
Code:
variables "Pside=oldTime(p);"; |
shredder BC instead of coupling
Dear Jack, dear Bernhard,
I have the same warning when running scalarTransportFoam on my case. Code:
--> FOAM Warning : https://dl.dropboxusercontent.com/u/..._condition.png The fluid moves steadily in negative z direction. The upper inlet patch is coupled to the lower one via groovyBC Code:
cycEl_front The results are like a shredder boundary condition: Instead of a coupling, that reproduces the values at the outlet, I get this: https://dl.dropboxusercontent.com/u/...ot_working.png Neither my supervisor nor me can think of any simpler yet adequate other BCs. Any advice? |
Quote:
|
The sign "-" in groovyBC
I have confused, When I use groovyBC to set the input of the velocity, such as this
Code:
inlet When I do not use it, the velocity will be in the opposite direction, ie the velocity input from outlet . Thanks, best regards, takasi |
Quote:
short answer: try Code:
para=(-1)*(Ustar/kappa)*log(E*Ustar*pos().y/nu)*normal(); I hope, this solves your problem! Greetings, Yeru |
Quote:
|
Quote:
I am having the same warning, in 1D the result is ok, but in 2D i can not have convergence |
All times are GMT -4. The time now is 12:39. |