Peclet Number

The analysis of motion induced eddy current models (without upwinding) in Elektra VL will probably present oscillations if the ‘cell Peclet number’ μσuh is much greater than one (h being the size of the element in the velocity direction u). This script will calculate for you the Peclet number for different mesh element sizes.

Dialog box for peclet number calculation

Images in script:

peclet.comi
/=============================================================================================================/
 
/ Thomatronik GmbH	
 
/ Brückenstr. 1	  Tel.: +49 (0)8031 2175-0     www.thomatronik.de
 
/ D-83022 Rosenheim	  Fax.: +49 (0)8031 2175-30    info@thomatronik.de
 
/
 
/ Author:	       Thomas Müller
 
/ Date:           22.11.2010
 
/ Opera-Version:  13.994
 
/
 
/ Comiskript for: Modeller Postprocessor Opera2d
 
/
 
/ Changes
 
/ --------
 
/ 22.11.2010: First Release
 
/
 
/=============================================================================================================/
 
/-------------------------------------------------------------------------------------------------------------/
 
/ Description:
 
/
 
/ This script will calculate the peclet number depending on the element size,  
 
/ with R, L and C
 
/
 
/-------------------------------------------------------------------------------------------------------------/
 
 
 
/ Preset some variables (only if they are not set yet)
 
$if %EXISTVAR(#mu_r) Eq 0
 
  $CONSTANT NAME=#mu_r  VALUE=1000
 
$END IF
 
/
 
$if %EXISTVAR(#sigma) Eq 0
 
  $CONSTANT NAME=#sigma   VALUE=1e7 Description='Conducitivity in S/m'
 
$END IF
 
/
 
$if %EXISTVAR(#radius) Eq 0
 
  $CONSTANT NAME=#radius  VALUE=65 Description='Maximum Radius'
 
$END IF
 
/
 
$if %EXISTVAR(#rpm) Eq 0
 
  $CONSTANT NAME=#rpm  VALUE=1500 Description='Rotations per minute'
 
$END IF
 
 
 
$if %EXISTVAR(#elementsize) Eq 0
 
  $CONSTANT NAME=#elementsize  VALUE=1 Description='Maximum element size in moving region'
 
$END IF
 
 
 
 
 
$CONSTANT NAME=#unit_micro   VALUE=1E-6
 
$CONSTANT NAME=#unit_mm      VALUE=1E-3
 
$CONSTANT NAME=#unit_cm      VALUE=1e-2
 
$CONSTANT NAME=#unit_m       VALUE=1
 
 
 
$string NAME=unit VALUE='mm'
 
 
 
/ Dialog to ask user information (with defaults set above) 
 
/ ===========================================================
 
$constant #state 0
 
 
 
$while #state<2 
 
  $if #state==0 
 
 
 
    $DIALOG ACTION=START TITLE='Calculate Peclet Number'  
 
       $groupbox action=start Title='' Orientation=horizontal strips=1
 
        $displayline 'peclet_number_Pecletformel.png'  
 
       $groupbox action=stop
 
    $DISPLAYLINE '<nobr><div align="center"><b>Please enter the data of your model:</b></div></nobr>' 
 
 
 
 
 
      $groupbox action=start Title='' Orientation=horizontal strips=2
 
        $layout spanx 2        
 
        $ASK NAME=#mu_r PROMPT='Permeability:'
 
        $ASK NAME=#Sigma PROMPT='Conductivity:'
 
        $Displayline 'S/m'
 
        $ASK NAME=#rpm PROMPT='Velocity:'
 
        $Displayline 'RPM'
 
        $layout spanx 2        
 
           $groupbox action=start Title='' Orientation=vertical strips=2
 
             $ASK NAME=#radius PROMPT='Maximum radius:'
 
             $ASK NAME=#elementsize PROMPT='Maximum element size:'
 
             $Layout spany 2        
 
             $PROMPT NAME=unit PROMPT='' HISTORY='m cm mm microm' EDIT=NO
 
           $groupbox action=stop
 
       $groupbox action=stop
 
    $DIALOG ACTION=First 
 
    $cons #state #state+VF_ButtonPressed
 
  $end if
 
 
 
/ Factor for length units
 
/ =====================
 
$STRING NAME=factor VALUE='#unit_&unit&'
 
 
 
/
 
/ The actual Equations
 
/ =========================
 
$para NAME=#velocity VALUE=2*pi*#radius*&factor&*#rpm/60
 
$para NAME=#peclet VALUE=#mu_r*mu0*#sigma*#velocity*#elementsize*&factor&
 
 
 
/
 
/ Print out the results 
 
/ ================================
 
 $if #state==1 
 
    $DIALOG ACTION=start TITLE='Results for Peclet number' 
 
       $DISPLAYLINE ''  
 
       $DISPLAYLINE TEXT='<div align=center><b>Peclet Number:</b> %real(#peclet)</div>' 
 
      $DISPLAYLINE ''  
 
    $DIALOG ACTION=Last
 
    $cons #state #state+VF_ButtonPressed
 
  $end if
 
 
 
$end while
scripts/dialogs/peclet_number.txt · Last modified: 2013/07/23 13:51 by henschel
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0