|
[Sponsors] |
[swak4Foam] Alternating scalar BC using groovyBC for a super focus mixer |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 3, 2014, 12:01 |
Alternating scalar BC using groovyBC for a super focus mixer
|
#1 |
New Member
Dominik Pöltl
Join Date: Jul 2013
Location: Hamburg
Posts: 21
Rep Power: 13 |
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 mag(vec)%(circ/n)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, Dominik 0/T-file: Code:
internalField uniform 0; boundaryField { focus_inlet { 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; } channel_outlet { type zeroGradient; } walls { type zeroGradient; } Last edited by Yeru; July 3, 2014 at 12:03. Reason: looks better :) |
|
Tags |
alternating bc, groovybc, super focus mixer |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 05:18 |
Division by zero exception - loop over scalarField | Pat84 | OpenFOAM Programming & Development | 6 | February 18, 2017 06:57 |
Issue symmetryPlane 2.5d extruded airfoil simulation | 281419 | OpenFOAM Running, Solving & CFD | 5 | November 28, 2015 14:09 |
Diverging solution in transonicMRFDyMFoam | tsalter | OpenFOAM Running, Solving & CFD | 30 | July 7, 2014 07:20 |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 02:47 |