|
[Sponsors] |
[swak4Foam] No particles inserted with groovyBC when using dsmcFOAM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 4, 2013, 10:19 |
No particles inserted with groovyBC when using dsmcFOAM
|
#1 |
New Member
Tobias Fuchs-Martschitz
Join Date: Oct 2013
Posts: 3
Rep Power: 12 |
Hi,
I am trying to run a case where I define a linear velocity gradient on the inlet and outlet, so for example have the velocity at y=0 be 10 and at y=ymax be 100. I am trying to use groovy bc for this. The code runs, but I dont get any particles inserted at my inlet or outlet. My number of equivalent particles is low enough that for a system not using groovyBC I get 150,000 particles. Does anyone know what the problem is? Here is my code: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object boundaryU; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 1 -1 0 0 0 0 ]; internalField uniform ( 0 0 0 ); boundaryField { outLet { type groovyBC; value uniform (0 0 0); variables "yp=pts().y;minY=min(yp);maxY=max(yp);wallV=10;str eamV=100;height=pos().y;grad=(steamV-wallV)/(maxY-minY)"; valueExpression "(wallV+grad*height)*normal()"; } inLet { type groovyBC; value uniform (0 0 0); variables "yp=pts().y;minY=min(yp);maxY=max(yp);wallV=10;str eamV=100;height=pos().y;grad=(steamV-wallV)/(maxY-minY)"; valueExpression "(wallV+grad*height)*normal()"; } front { type cyclic; } back { type cyclic; } surface { type fixedValue; value uniform (0 0 0); } sphere { type fixedValue; value uniform (0 0 0); } top { type fixedValue; value uniform (0 0 0); } } // ************************************************** *********************** // Id be very grateful for any help! Kind Regards, Tobias |
|
December 4, 2013, 13:07 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
- which solver are you using: I guess it is one with lagrangian particles - how are you injecting the particles: my guess is on the patch The problem is IMHO not groovyBC but that you're using it wrong and did not check the velocities that you implemented with it. At a first glance the two BCs look suspiciously similar: not even a sign is different. Haven't looked it through, but seems to me that the expression before normal() in the valueExpressions is always positive. If I'm not mistaken normal() always points out of the geometry. So you set patches where flow goes out. If you inject particles there, where might they go? Hmm …
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
December 5, 2013, 05:05 |
|
#3 | |
New Member
Tobias Fuchs-Martschitz
Join Date: Oct 2013
Posts: 3
Rep Power: 12 |
Quote:
To give you more information: I am running dsmcFOAM, which creates a "lagrangian" and "uniform" in my /0/ directory. So i guess it is a Lagrangian solver. Yes, you are correct, I am injecting them on the patch. Yes the two boundaries are the same. I wanted to impose the same velocity gradient in the inlet and the outlet. I have now changed the inlet boundary condition to point INTO the geometry, by adding a negative sign. When running it this way, I dont get any particles injected either. When initialising the system with particles, they slowly start to dissipate through both patches. I have tried running example cases listed here: http://openfoamwiki.net/index.php/Contrib/groovyBC ,where the simplest one should be the one with a parabolic inlet condition that pulsates: inlet { type groovyBC; variables "yp=pts().y;minY=min(yp);maxY=max(yp);para=-(maxY-pos().y)*(pos().y-minY)/(0.25*pow(maxY-minY,2))*normal();"; valueExpression "10*(1+0.5*sin(500*time()))*para"; value uniform (10 0 0); } outlet { type groovyBC; valueExpression "vector(0,0,0)"; gradientExpression "vector(0,0,0)"; fractionExpression "(phi > 0) ? 0 : 1"; value uniform (0 0 0); } These unfortunately don't insert any particles either. I wanted to try and condense my problem to a few questions to make it easier to answer: 1. Am I missing an essential component here for inserting particles? I have looked through the forums, but haven't found any information regarding this. 2. If the inlet/outlet BC's are say both say 10m/s at a certain height, pointing in the same direction, (inlet points into geometry, outlet points out of geometry), would this have been the correct definition? So far I have been using it this way. 3. Is there any more information I you would need to identify the problem? 4. I have defined the rest of my boundary files for the inlet and outlet just as I would for a regular inlet/outlet. (I believe this is zerogradient for all boundary files, apart from temperature, which I set to be 300K and for the pointlevel, which is set as calculated). Do I need to define these as groovyBC as well? Thank you very much for any help! Its really appreciated! Tobias |
||
December 5, 2013, 05:08 |
|
#4 | |
New Member
Tobias Fuchs-Martschitz
Join Date: Oct 2013
Posts: 3
Rep Power: 12 |
Quote:
|
||
December 5, 2013, 11:46 |
|
#5 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Don't understand. But if it works: great
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
Tags |
dsmcfoam openfoam, groovybc |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
dsmcFoam setup | hherbol | OpenFOAM Pre-Processing | 1 | November 19, 2021 01:52 |
[swak4Foam] Change in alpha and U with groovyBC in twoPhaseEulerFoam | dani2702 | OpenFOAM Community Contributions | 0 | November 17, 2016 03:30 |
dsmcFoam - micro-hole limiting the number of dsmc particles | Araist | OpenFOAM Running, Solving & CFD | 0 | June 25, 2015 06:50 |
dsmcFoam charged particles | latvietis | OpenFOAM | 0 | October 15, 2012 10:26 |
Per face tracking of particles that left and entered the cell in dsmcFoam | sor | OpenFOAM Programming & Development | 1 | August 28, 2012 05:35 |