libC81 Module


Used by

  • module~~libc81~~UsedByGraph module~libc81 libC81 program~demo1 demo1 program~demo1->module~libc81 program~demo3 demo3 program~demo3->module~libc81 program~demo2 demo2 program~demo2->module~libc81

Contents


Derived Types

type, public :: C81_class

Base class for C81 performance data

Components

TypeVisibility AttributesNameInitial
character(len=30), public :: airfoilName
integer, public :: ML

No. of lift coefficient machs

integer, public :: NL

No. of lift coefficient alphas

integer, public :: MD

No. of drag coefficient machs

integer, public :: ND

No. of drag coefficient alphas

integer, public :: MM

No. of moment coefficient machs

integer, public :: NM

No. of moment coefficient alphas

real, public, allocatable, dimension(:):: MaL

Machs for lift

real, public, allocatable, dimension(:):: MaD

Machs for drag

real, public, allocatable, dimension(:):: MaM

Machs for moment

real, public, allocatable, dimension(:):: AL

Alphas for lift

real, public, allocatable, dimension(:):: AD

Alphas for drag

real, public, allocatable, dimension(:):: AM

Alphas for moment

real, public, allocatable, dimension(:,:):: CL

Lift coefficient

real, public, allocatable, dimension(:,:):: CD

Drag coefficient

real, public, allocatable, dimension(:,:):: CM

Moment coefficient

Type-Bound Procedures

procedure, public :: writefile
procedure, public :: readfile
procedure, public :: getCL
procedure, public :: getCD
procedure, public :: getCM

Functions

public function getCL(this, alphaQuery, machQuery)

Returns value of 2-d linear interpolated CL for a given alphaQuery and machQuery values

Arguments

Type IntentOptional AttributesName
class(C81_class) :: this
real, intent(in) :: alphaQuery
real, intent(in) :: machQuery

Return Value real

public function getCD(this, alphaQuery, machQuery)

Returns value of 2-d linearly interpolated CD for given alphaQuery and machQuery values

Arguments

Type IntentOptional AttributesName
class(C81_class) :: this
real, intent(in) :: alphaQuery
real, intent(in) :: machQuery

Return Value real

public function getCM(this, alphaQuery, machQuery)

Returns value of 2-d linearly interpolated CM for given alphaQuery and machQuery values

Arguments

Type IntentOptional AttributesName
class(C81_class) :: this
real, intent(in) :: alphaQuery
real, intent(in) :: machQuery

Return Value real

public function getInterval(A, x) result(indx)

Returns upper and lower indices of a 1-d sorted array using binary search in which a search value lies

Arguments

Type IntentOptional AttributesName
real, intent(in), dimension(:):: A
real, intent(in) :: x

Return Value integer, dimension(2)

public function getBilinearInterp(x, y, xvec, yvec, f11, f12, f21, f22)

Returns bilinearly interpolated values at (x,y)

Arguments

Type IntentOptional AttributesName
real, intent(in) :: x

Queried x

real, intent(in) :: y

Queried y

real, intent(in), dimension(2):: xvec
real, intent(in), dimension(2):: yvec
real, intent(in) :: f11
real, intent(in) :: f12
real, intent(in) :: f21
real, intent(in) :: f22

Return Value real

public function getTable(filename, rows, cols)

Returns data from csv formatted file

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: filename
integer, intent(in) :: rows

No. of rows

integer, intent(in) :: cols

No. of columns

Return Value real, dimension(rows,cols)


Subroutines

public subroutine writefile(this, C81filename)

Writes C81 class data to C81 file

Arguments

Type IntentOptional AttributesName
class(C81_class) :: this
character(len=*), intent(in) :: C81filename

public subroutine readfile(this, C81filename)

Reads from C81 file to C81 class

Arguments

Type IntentOptional AttributesName
class(C81_class) :: this
character(len=*), intent(in) :: C81filename