CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Turbulent inlet of mass flow (from csv file)

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 26, 2014, 04:04
Default Turbulent inlet of mass flow (from csv file)
  #1
New Member
 
Tommy V
Join Date: Nov 2013
Posts: 28
Rep Power: 3
Villo is on a distinguished road
Hi Foamers. I need a turbulent mass flow inlet for a time varying flow rate.
I tried to apply the following BC for a U profile (Solver:twoLiquidMixingFoam).
in
{
type turbulentInlet;
fluctuationScale (0.02 0.01 0.01);
referenceField flowRateInletVelocity;

massFlowRate table
(
( 0.0000000e+001 0.0000000e+000 )
( 0.0100000e+001 5.2890505e-003 )
( 0.050000e+001 1.0507891e-001 )
( 0.1030000e+001 1.5657144 )
( 0.2040000e+001 2.5737434 )
( 0.30000e+001 3.5749383 )
);
rho phase1;
rhoInlet 842.346;
}

No errors are generated starting the simulation, but seems as the inlet field does not feel the perturbation. Hierarchical errors?


In addiction I discover that using the csv data input as shown in the following BC
in
{
type flowRateInletVelocity;
massFlowRate csvFile;
csvFileCoeffs
{
fileName "FlowRate2.dat";
outOfBounds clamp;
hasHeaderLine false;
refColumn 0;
componentColumns (1);
}
rho phase1;
rhoInlet 842.346;

}

The simulation has no problem to start on 1 processor,
Reading g
Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

AMI: Creating addressing and weights between 204 source faces and 204 target faces
AMI: Patch source weights min/max/average = 1, 1, 1
AMI: Patch target weights min/max/average = 1, 1, 1
Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting turbulence model type LESModel
Selecting LES turbulence model Vreman
Selecting LES delta type cubeRootVol
VremanCoeffs
{
ce 1.048;
ck 0.094;
}

Calculating field g.h

Courant Number mean: 0.00132949 max: 0.2065

PIMPLE: Operating solver in PISO mode


Starting time loop

Courant Number mean: 0.00132949 max: 0.2065
Interface Courant Number mean: 0 max: 0
deltaT = 0.0111111
Time = 0.0111111

MULES: Solving for alpha1
Phase-1 volume fraction = 0.00147721 Min(alpha1) = 0 Max(alpha1) = 1
MULES: Solving for alpha1
Phase-1 volume fraction = 0.00295443 Min(alpha1) = 0 Max(alpha1) = 1
DICPCG: Solving for alpha1, Initial residual = 0.0995769, Final residual = 4.06332e-15, No Iterations 1
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 3.11085e-08, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 4.01e-07, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 2.80578e-07, No Iterations 1
GAMG: Solving for p_rgh, Initial residual = 1, Final residual = 3.81469e-07, No Iterations 36
time step continuity errors : sum local = 1.12702e-09, global = -8.37911e-11, cumulative = -8.37911e-11
GAMG: Solving for p_rgh, Initial residual = 0.00724602, Final residual = 7.52881e-07, No Iterations 13
time step continuity errors : sum local = 4.74598e-07, global = 1.64522e-07, cumulative = 1.64439e-07
ExecutionTime = 1.15 s ClockTime = 1 s


but if i try to run it on more than one processor (4 in this case) i obtain the following error:

Reading g
Reading field p_rgh

AMI: Creating addressing and weights between 204 source faces and 204 target faces
AMI: Patch source weights min/max/average = 1, 1, 1
AMI: Patch target weights min/max/average = 1, 1, 1
Reading field U

[3]
[3]
[3] --> FOAM FATAL IO ERROR:
[3] wrong token type - expected int, found on line 46 the word '^A'
[3]
[3] file: /scratch/villoresi/TEST/processor3/0/U.boundaryField.in.csvFileCoeffs.componentColumns at line 46.
[3]
[3] From function operator>>(Istream&, int&)
[3] in file primitives/ints/int/intIO.C at line 68.


Why??

P.S. Yeah, i would like to use swak4foam but i cannot being that i cannot update bison for admin reasons.

Last edited by Villo; March 26, 2014 at 06:18.
Villo is offline   Reply With Quote

Reply

Tags
csv files, flowrateinletvelocity, parallel error, turbulentinlet

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
groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM 23 July 10, 2015 09:44
how to calculate mass flow rate on patches and summation of that during the run? immortality OpenFOAM Post-Processing 82 November 25, 2014 14:16
funkySetFields compilation error tayo OpenFOAM 39 December 3, 2012 06:18
2.0.x on Mac OSX niklas OpenFOAM Installation on Windows, Mac and other Unsupported Platforms 74 March 28, 2012 16:46
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00


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