CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Scale discrete inlet velocity profile with groovyBC (http://www.cfd-online.com/Forums/openfoam/76556-scale-discrete-inlet-velocity-profile-groovybc.html)

cboss May 28, 2010 11:13

Scale discrete inlet velocity profile with groovyBC
 
Hi,

for an inlet patch with approximately 3000 faces I have a discrete profile for inlet velocity. Putting these values in the U file sets a velocity vector to every single face.

Generally setting an inlet velocity profile for a compressible flow will not exactly give a desired mass-flow. So I tried to scale the velocity field with groovyBC, to get an defined mass-flow.

3000 faces lead to 3 vectors (u, v, w) of length 3000. Trying to read such a vector with groovyBC gives the error:
string "u=(-62.420493,-52.599637,-51.460724,-60.386578,-58.347571,-61.218533,-57.528353,..."
is too long (max. 1024 characters)

Is there a way to scale such long vectors with groovyBC?

Thanks and a nice weekend,

Christoph

tamsilian June 20, 2010 13:02

GroovyBC in cirdulation geometry
 
http://i50.tinypic.com/2z4la3q.pngHi sir/Madam
I simulated circular geometry as polymer fluid in around of rotating screw in extruder. I possess some problem to describe boundary condition for movingWalls. I want to use groovyBC to specify velocity vectors (Ux,Uy,Uz) in movingWalls BC where is depend on places in face. I cannot define velocity function with C++ rules. Could you help me about coding this BC as C++ rules? Content of U file, 0file are presented as follow:
Tnx in avanced your help

class volVectorField;
object U;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
inlet
{
type fixedValue;
value uniform (0 0 10);
}
movingWalls
{
Velocity vectors calculated by (-0.0346*sin(teta) ,0.0346*cos(teta),0.4764) where angle range is between 0 to 2pi.
}
fixedWalls
{
type fixedValue;
value uniform (0 0 0);
}
outlet
{
type zeroGradient;

}

}


All times are GMT -4. The time now is 03:32.