CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Droplet velocity in sprayFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 30, 2015, 08:33
Default Droplet velocity in sprayFOAM
  #1
New Member
 
Tariq Ahmed
Join Date: Jan 2015
Posts: 13
Rep Power: 11
Tariq Ahmed is on a distinguished road
Hi,
I am using sprayfoam solver and I want to sample the droplet velocity data. I used sampleDict to specify Temperature fields and sampled the temperature data. But now I want to sample droplet velocity data and when I specify U as fields I am getting only gas phase velocities.

I use Cone nozzle injector and I have specified pressure driven velocity for the flow type and size distribution of droplets are given by Rosin Rammler distribution. It would be helpful if somebody can guide me on how to sample the droplet velocity data from my simulation results

I tried swak4Foam to find droplet velocity but when I use the following at the end of controldict,

Code:
libs (
      "libOpenFOAM.so"
      "libsimpleSwakFunctionObjects.so"
      "libswakFunctionObjects.so"
      "libgroovyBC.so"
     );

functions
{
   
   downAverage
    {
        type swakExpression;
    outputControl outputTime;
        outputInterval 1;
        valueType internalField;
        variables (
             "downDirection=vector(1,0,0);"//select the downwards direction
             "thres=0.5;"//which cells to keep
             "liquidVol=sum(alpha1>thres ? vol() : 0);" //calculates the volume of the drop
             "downVel=alpha1>thres ? (U & downDirection) : 0;" //a & b:inner vector product. Keep the y component of U.
        );
        expression "downVel*vol()/liquidVol";//vol():vol of the cell
        accumulations (
           sum
        );
        
        verbose true;
    }
   createInterface
    {
        type createSampledSurface;
        outputControl outputTime;
        outputInterval 1;
        surfaceName interface;
        surface {
            type isoSurface;
            isoField alpha1;
            isoValue 0.5;
            interpolate true;
        }
    }
    
    xDiameter
    {
        type swakExpression;
    outputControl outputTime;
        outputInterval 1;
        valueType surface;
        surfaceName interface;
        verbose true;
        expression "pos().x";
        accumulations (
            min
            max
        );        
    }
    
    yDiameter
    {
        type swakExpression;
    outputControl outputTime;
        outputInterval 1;
        valueType surface;
        surfaceName interface;
        verbose true;
        expression "pos().y";
        accumulations (
            min
            max
        );        
    } 
      
}
I get the following error message

Code:
[2] --> FOAM FATAL ERROR:                                                                         
[2]  Parser Error for driver FieldValueExpressionDriver at "1.5-10" :"field alpha1 not existing or of wrong type"
"sum(alpha1>thres ? vol() : 0)"                                                                                  
      ^^^^^^                                                                                                     
------|                                                                                                          

Context of the error:


- From dictionary: IOstream.functions.downAverage
  Evaluating expression "sum(alpha1>thres ? vol() : 0)"
[2]                                                    
[2]                                                    
[3]                                                    
[3] --> FOAM FATAL ERROR:                              
[3]  Parser Error for driver FieldValueExpressionDriver at "1.5-10" :"field alpha1 not existing or of wrong type"
"sum(alpha1>thres ? vol() : 0)"                                                                                  
      ^^^^^^                                                                                                     
------|                                                                                                          

Context of the error:


- From dictionary: IOstream.functions.downAverage
  Evaluating expression "sum(alpha1>thres ? vol() : 0)"
[3]                                                    
[3]                                                    
[3] [5]                                                

[1] 
[1] --> FOAM FATAL ERROR: 
[1]  Parser Error for driver FieldValueExpressionDriver at "1.5-10" :"field alpha1 not existing or of wrong type"
"sum(alpha1>thres ? vol() : 0)"                                                                                  
      ^^^^^^                                                                                                     
------|                                                                                                          

Context of the error:


- From dictionary: IOstream.functions.downAverage
  Evaluating expression "sum(alpha1>thres ? vol() : 0)"
[1]                                                    
[1]                                                    
[1]     From function parsingValue                     

[2]     From function parsingValue
[2]     in file lnInclude/CommonValueExpressionDriverI.H at line     From function parsingValue
[3]     in file lnInclude/CommonValueExpressionDriverI.H at line [1]     in file lnInclude/CommonValueExpressionDriverI.H at line 1189.                                                                                                                           
[1]                                                                                                                              
FOAM parallel run exiting                                                                                                        
[1]                                                                                                                              
[4]                                                                                                                              
[4] --> FOAM FATAL ERROR:                                                                                                        
[4]  Parser Error for driver FieldValueExpressionDriver at "1.5-10" :"field alpha1 not existing or of wrong type"                
"sum(alpha1>thres ? vol() : 0)"                                                                                                  
      ^^^^^^                                                                                                                     
------|                                                                                                                          

Context of the error:


- From dictionary: IOstream.functions.downAverage
  Evaluating expression "sum(alpha1>thres ? vol() : 0)"
[4]                                                    
[4]                                                    
[4]     From function parsingValue                     

[5] 
[5] --> FOAM FATAL ERROR: 
[5]  Parser Error for driver FieldValueExpressionDriver at "1.5-10" :"field alpha1 not existing or of wrong type"
"sum(alpha1>thres ? vol() : 0)"                                                                                  
      ^^^^^^                                                                                                     
------|                                                                                                          

Context of the error:


- From dictionary: IOstream.functions.downAverage
  Evaluating expression "sum(alpha1>thres ? vol() : 0)"
[5]                                                    
[5]                                                    
[5]     From function parsingValue                     
[5]     in file lnInclude/CommonValueExpressionDriverI.H at line 1189.
[5]                                                                   
FOAM parallel run exiting                                             
[5]                                                                   
1189.                                                                 
[3]                                                                   
FOAM parallel run exiting                                             
[3]                                                                   
1189.                                                                 
[2]                                                                   
FOAM parallel run exiting                                             
[2]                                                                   
[4]     in file lnInclude/CommonValueExpressionDriverI.H at line 1189.
[4]                                                                   
FOAM parallel run exiting                                             
[4]                                                                   

[0] 
[0] --> FOAM FATAL ERROR: 
[0]  Parser Error for driver FieldValueExpressionDriver at "1.5-10" :"field alpha1 not existing or of wrong type"
"sum(alpha1>thres ? vol() : 0)"                                                                                  
      ^^^^^^                                                                                                     
------|                                                                                                          

Context of the error:


- From dictionary: /home12233/tariq/OpenFOAM/tariq-2.3.x/run/tutorials/lagrangian/sprayFoam/likun_mesh_mycase/system/controlDict.functions.downAverage
  Evaluating expression "sum(alpha1>thres ? vol() : 0)"
[0]
[0]
[0]     From function parsingValue
[0]     in file lnInclude/CommonValueExpressionDriverI.H at line 1189.
[0]
FOAM parallel run exiting
[0]
Tariq Ahmed is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
droplet falling - VOF bohis FLUENT 1 July 10, 2013 04:28
unable to get parabolic velocity profile with pimplefoam houkensjtu OpenFOAM 4 October 8, 2012 04:41
WSS and normal velocity gradient for the slanted pipe wanna88 FLUENT 2 October 1, 2012 22:34
how to compute relative velocity from absolute? spk Main CFD Forum 3 July 9, 2010 08:42
Neumann pressure BC and velocity field Antech Main CFD Forum 0 April 25, 2006 02:15


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