Description This function queries a Surface Particle (Mie) scatter model for its percent area coverage (PAC) value. The PAC value is calculated by adding up the cross sectional areas of spherical particles for the particle distribution function of the model (the number of particles of a given diameter over a range of particle sizes).
Syntax pac = GetMieScatterPercentAreaCoverage( mieNode )
Parameters pac (Double) Returned percent area coverage value for the specified Surface Particle (Mie) scatter model.
mieNode As Long Node number of the Surface Particle (Mie) scatter model being queried. If mieNode is not a Surface Particle (Mie) scatter type, then the function halts with an error message reporting that the specified entity is not of the correct type.
Example The example below shows a case where we update the CL and maximum particle size for a Mie model with a 1246C particulate distribution inside a loop and report the PAC value calculated by the GetMieScatterPercentAreaCoverage function as well as the PAC value from a commonly used approximation function.
Sub Main
ClearOutputWindow()
'Scatter model we are querying Dim mieNode As Long mieNode = FindScatter( "Mie Model" ) Print "Mie model: " & Chr(9) & GetScatterName( mieNode ) Print ""
'Range of CLs we want to scan Dim startCl As Double, endCL As Double, clStep As Double Dim nSteps As Long startCl = 200 endCL = 1000 nSteps = 10 clStep = (endCL - startCl)/nSteps
'Retrieve the model's parameters Dim tMie As T_MIESCATTER GetMieScatter( mieNode, tMie )
'Header Print "CL"; Print "PAC"; Print "Approx"
'Loop over CLs, update the model, print the CL, PAC and approximate PAC Dim curCL As Double, pac As Double For curCL = startCl To endCL Step clStep
tMie.CleanLevel = curCL tMie.MaxDia = curCL SetMieScatter( mieNode, tMie ) pac = GetMieScatterPercentAreaCoverage( mieNode )
Print curCL; Print pac; Print CalcApproxPAC( curCL )
Next
End Sub
Function CalcApproxPAC( ByVal in_cl As Double ) As Double
'Approximate PAC calculation Dim pac As Double pac = -7.245 + 0.926 * (Log10(in_cl)^2) pac = 10^pac
Return pac
End Function
See Also
|