CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

Alternating scalar BC using groovyBC for a super focus mixer

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

LinkBack Thread Tools Display Modes
Old   July 3, 2014, 11:01
Default Alternating scalar BC using groovyBC for a super focus mixer
New Member
Dominik Pöltl
Join Date: Jul 2013
Location: Hamburg
Posts: 16
Rep Power: 6
Yeru is on a distinguished road
Hi @ all,

I'm working on simulating a super focus mixer.

Here's the checkmesh.log. All fine.
Since "in real life" the nozzles for fluid A and B shall alternate in the focus inlet in x-direction, I want to assign alternating scalar values for T using scalarTransportFoam with groovyBC.

Below you find the 0/T-file.
Here's the general idea:
-circ is the circumference of the focus inlet
-n is the total number of nozzles
I'm creating the vector vec for calculation
If this is <=0.5 I want to assign value A, otherwise value B.

Using scalarTransportFoam works without any warnings (log-file) but in ParaView, the focus inlet is globally assigned my "failsafe" value 0.1.

I'm certain there are no mess-ups due to convertToMeters or anything alike.

Any ideas how to get by this?
Much appreciated,

internalField   uniform 0;

    type           groovyBC;
    variables    "n=5;alpha=pi*50/180;b_channel=500e-3;l_focus=1000e-3;r=(b_channel/2+tan(alpha/2)*l_focus)/(sin(alpha/2));circ=r*alpha;vec=vector(pos().x,0,pos().z-l_focus);";
//    condition ? value_if_true : value_if_false 
    valueExpression "mag(vec)%(circ/n)<=0.5    ?    1    :    0.5";
    value         uniform 0.1;

        type            zeroGradient;

        type            zeroGradient;

Last edited by Yeru; July 3, 2014 at 11:03. Reason: looks better :)
Yeru is offline   Reply With Quote


alternating bc, groovybc, super focus mixer

Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
dieselFoam problem!! trying to introduce a new heat transfer model vivek070176 OpenFOAM Programming & Development 10 December 24, 2014 00:48
Diverging solution in transonicMRFDyMFoam tsalter OpenFOAM Running, Solving & CFD 30 July 7, 2014 06:20
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 01:47
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 11 April 22, 2014 12:32
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 02:27

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