Sunday, October 31, 2010

PROCESSES MODELLED AS FIRST-ORDER SYSTEMS(The first-order processes are characterization and examples)

PROCESSES MODELLED AS FIRST-ORDER SYSTEMS

The first-order processes are characterized by:

(a) their capacity to store material, energy or momentum, and

(b) the resistance associated with the flow of mass, energy or momentum in reaching the capacity.

Thus, the dynamic response of tanks which have the capacity to store liquids or gases can be modeled as

first-order. The resistance is associated with the pumps, valves, weirs, pipes which are attached to the

inflowing or outflowing liquids or gases. Similarly, the response of solid, liquid, or gaseous systems

which can store thermal energy (thermal capacity, cp) is modeled as first-order.



For such systems the resistance is associated with the transfer of heat through walls, liquids or gases. In

other words, a process which possesses a capacity to store mass or energy and thus act as a buffer

between inflowing and outflowing streams will be modeled as a first-order system.

The stirred tank heater  and the mixing processes , are typical examples of first-order processes.

First-order lag, linear lag, exponential transfer lag, First order system transfer function,steady state gain or static gain or simply the gain of the process,time constant


A first-order system is one whose output, y(t), is modeled by a first order,linear differential equation


where f(t) is the input (forcing function). If a0 # 0, then above eqation yields,



Define,



𝜏p is known as the time constant of the process

and KP is called the steady state gain or static gain or simply the gain of the process.

From eqn, it is easily found that the transfer function of a firstorder process is given by;


A first-order process with a transfer function given by above eqn. is also known as: first-order lag, linear lag, exponential transfer lag.


If on the other hand, a0 = 0, then from eqn. we take


which gives a transfer function



In such case the process is called purely capacitive or pure integrator

what is a first order system and what physical phenomena give rise to first order system(It's transfer function)?

WHAT IS A FIRST-ORDER SYSTEM?

A first-order system is one whose output, y(t), is modeled by a first order,linear differential equation

 






Define,


 

𝜏p is known as the time constant of the process
and KP is called the steady state gain or static gain or simply the gain of the process.
From eqn, it is easily found that the transfer function of a firstorder process is given by;
A first-order process with a transfer function given by above eqn. is also known as: first-order lag, linear lag, exponential transfer lag.

If on the other hand, a0 = 0, then from eqn. we take

which gives a transfer function
In such case the process is called purely capacitive or pure integrator


where f(t) is the input (forcing function). If a0 # 0, then above eqation yields,

Purely capacitive or pure integrator process definition and it's transfer function

The transfer function of a firstorder process is given by;




A first-order process with a transfer function given by above eqn. is also known as: first-order lag, linear lag, exponential transfer lag.

If on the other hand, a0 = 0, then from eqn. we take



which gives a transfer function



In such case the process is called purely capacitive or pure integrator

Direct Digital Control (DDC) (Definition & operating,working procedure)

Direct Digital Control (DDC):

This is one of the application of digital omputer application of in process control. In such application the computer receives the directly the measurements from the process and based on the control law which is already programmed and  resides in it's memory calculates the value of the manipulated  variables, These,decisions, are,now implemented directly on the process by the computer through the proper adjustment of the final control elements (valves, pumps, compressors, switches, etc.). This dfrect implementation of the control decisions gave rise to .the name direct digital control, or simply DDC.

The process can be any of the units we,have already considered such as; heaters, reactors, separators, etc. The two interfaces before and after  the computer are hardware elements and they are used to create the interface between the computer and the process.

Today the chemical industry is moving more and more towards the DDC of the plants. A typical system of 'DDC's for an ethylene plant can include, between 300 and 400 control loops. Al1 the companies which furnish the control systems for the chemical industry: rely more and more on DDC.

FOTRAN program to calculate Lennard Jones potentials (Energy ) using Monte Carlo method

This involves both Displacement of the selected particle and LJ potential calculation

// First Displacement of particle and Acceptance of Move

subroutine displace(success, ihs)

Use sp
Use xyz
Use randmod
Use moves
Use tmmod

implicit none

logical            :: success
integer            :: ihs,i

integer            :: mol

real,dimension(1:5)    :: xold, yold, zold
real,dimension(1:5)    :: xnew, ynew, znew
real            :: dx, dy, dz, xo,yo,zo,xn,yn,zn
real            :: emffnew, emffold, ioneffold, ioneffnew, ioneffold1, ioneffnew1
real            :: emwfnew, emwfold, ionewfnew, ionewfold, ionewfnew1, ionewfold1
real            :: de, dlnpsi

success = .false.
emffnew = 0
emffold = 0
emwfnew = 0
emwfold = 0
ioneffold = 0
ioneffold1 = 0
ioneffnew = 0
ioneffnew1 = 0
ionewfold = 0
ionewfold1 = 0
ionewfnew = 0
ionewfnew1 = 0
pacc = 0.0

if( Nmol == 0 ) return
ihs = 1
if( ran2(Seed) > 0.33 ) ihs = 2

if( ihs == 1 ) then

        dx = 0.0
        dy = 0.0
        dz = ( 2.0 * ran2(Seed) - 1.0 ) * dh * bh

else

        dx = ( 2.0 * ran2(Seed) - 1.0 ) * ds * bs
        dy = ( 2.0 * ran2(Seed) - 1.0 ) * ds * bs
        dz = 0.0

end if

mol = int( Nmol * ran2(Seed) ) + 1

if (mol .eq. Nmol) then
              
    xo = Xr
    yo = yr
    zo = zr

    xn = xo + dx
    yn = yo + dy
    zn = zo + dz

    if( xn > bs )  xn = xn - bs * aint( xn / bs )
        if( yn > bs )  yn = yn - bs * aint( yn / bs )
        if( nwalls == 0 .and. zn > bh ) zn = zn - bh * aint( zn / bh )
       
    if( nwalls > 0  .and. zn > bh )  return
    if( xn < 0.0 )  xn = xn - bs * aint( xn / bs - 1.0 )
    if( yn < 0.0 )  yn = yn - bs * aint( yn / bs - 1.0 )
    if( nwalls == 0 .and. zn < 0.0 )  zn = zn - bh * aint( zn / bh - 1.0 )
    if( nwalls > 0  .and. zn < 0.0 )  return

        call ljmoleculeion(ioneffold,ionewfold)
        call ljmoleculeion1(ioneffold1,ionewfold1)

        ioneffold = (1-lambda) * ioneffold + (lambda * ioneffold1)

        Xr = xn
        Yr = yn
        Zr = zn

        call ljmoleculeion(ioneffnew,ionewfnew)
        call ljmoleculeion1(ioneffnew1,ionewfnew1)

        ioneffnew = (1-lambda) * ioneffnew + (lambda * ioneffnew1) 

    de = (ioneffnew + ionewfnew ) - (ioneffold + ionewfold)
         
else
    xold(:) = X(mol,:)
    yold(:) = Y(mol,:)
    zold(:) = Z(mol,:)

    xnew = xold + dx
    ynew = yold + dy
    znew = zold + dz

    do i=1,5
        if( xnew(i) > bs )  xnew(i) = xnew(i) - bs * aint( xnew(i) / bs )
        if( ynew(i) > bs )  ynew(i) = ynew(i) - bs * aint( ynew(i) / bs )
        if( nwalls == 0 .and. znew(i) > bh ) znew(i) = znew(i) - bh * aint( znew(i) / bh )
        if( nwalls > 0  .and. znew(i) > bh )  return
                           
        if( xnew(i) < 0.0 )  xnew(i) = xnew(i) - bs * aint( xnew(i) / bs - 1.0 )
        if( ynew(i) < 0.0 )  ynew(i) = ynew(i) - bs * aint( ynew(i) / bs - 1.0 )
        if( nwalls == 0 .and. znew(i) < 0.0 )  znew(i) = znew(i) - bh * aint( znew(i) / bh - 1.0 )
        if( nwalls > 0  .and. znew(i) < 0.0 )  return

    end do
                       
    call ljmolecule(mol, emffold, emwfold)
       

    X(mol,:) = xnew(:)
    Y(mol,:) = ynew(:)
    Z(mol,:) = znew(:)

    call ljmolecule(mol, emffnew, emwfnew)
      
    de = ( emffnew + emwfnew ) - ( emffold + emwfold )
      
endif


dlnpsi = - beta * de

pacc = -beta * de

if ( de > 2160.0) then

 !write(*,*)' problem is in displaces stop stop stop stopstop*************************',mol
  write(*,*)' change',ihs,dx,dy,dz,de
  write(*,*) '  energies', emffnew,emffold

!  write(*,*)' xold', xold
 ! write(*,*)' yold', yold
  !write(*,*)' zold', zold


  !write(*,*)' xnew', xnew
  !write(*,*)' ynew', ynew
  !write(*,*)' znew', znew
 
 end if
if( pacc < 0.0 ) then

    pacc = exp(pacc)

else

    pacc = 1.0

end if

if( log( ran2(Seed) ) < dlnpsi ) then   
       
    success = .True.
    !ebff = ebff + emffnew - emffold + ioneffnew - ioneffold
       
    ebff=ebff+de
    ebwf = ebwf + emwfnew - emwfold + ionewfnew - ionewfold
     
else
    if (mol .eq. Nmol) then
        xr = xo
        yr = yo
        zr = zo
    else
        X(mol,:) = xold(:)
        Y(mol,:) = yold(:)
        Z(mol,:) = zold(:)
    endif
   
end if

return

end subroutine displace

//LJ Potential calculation

subroutine ljinteract(eff,ewf)

Use xyz
Use sp
Use lj

implicit none

real        :: eff,uc1, uc2, uc3, ewf

integer        :: i, j

real        :: xij, yij, zij

real        :: dx,dy,dz

real        :: xi, yi, zi

real         :: ioneff0, ionewf0, ioneff1, ionewf1, ioneff, ionewf

real        :: rij2, rj2, xcmij, ycmij, zcmij, roij2

real, external    :: uff, uwf, ucharge, usflj

!****************************************************************

eff = 0.0
ewf = 0.0

if( Nmol == 0 ) return
do i = 1, Nmol - 2
  
    do j = i+1, Nmol-1
  
    xi = X(i,5)
    yi = Y(i,5)
    zi = Z(i,5)

    xij = abs( X(j,5) - xi )
    yij = abs( Y(j,5) - yi )
    zij = abs( Z(j,5) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
  
    rij2 = xij*xij + yij*yij + zij*zij
  
    xi = X(i,1)
    yi = Y(i,1)
    zi = Z(i,1)

    xij = abs( X(j,1) - xi )
    yij = abs( Y(j,1) - yi )
    zij = abs( Z(j,1) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
  
    roij2 = xij*xij + yij*yij + zij*zij          ! Distance between O-O atoms

        if( roij2 < rcutsq ) then
    eff = eff + usflj(roij2)
    end if
  
     !m1
    xi = X(i,2)
    yi = Y(i,2)
    zi = Z(i,2)

     !m1 m2
    xij = abs( X(j,2) - xi )
    yij = abs( Y(j,2) - yi )
    zij = abs( Z(j,2) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
    eff = eff + ucharge(rj2,roij2,1,1)

    !m1 h21
    xij = abs( X(j,3) - xi )
    yij = abs( Y(j,3) - yi )
    zij = abs( Z(j,3) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
    eff = eff + ucharge(rj2,roij2,1,2)
        
    !m1 h22
    xij = abs( X(j,4) - xi )
    yij = abs( Y(j,4) - yi )
    zij = abs( Z(j,4) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
    eff = eff + ucharge(rj2,roij2,1,2)

    !H11
    xi = X(i,3)
    yi = Y(i,3)
    zi = Z(i,3)

    !H11 m2
    xij = abs( X(j,2) - xi )
    yij = abs( Y(j,2) - yi )
    zij = abs( Z(j,2) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh

    rj2 = xij*xij + yij*yij + zij*zij
    eff = eff + ucharge(rj2,roij2,2,1)

    !H11 H21
    xij = abs( X(j,3) - xi )
    yij = abs( Y(j,3) - yi )
    zij = abs( Z(j,3) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh

    rj2 = xij*xij + yij*yij + zij*zij
    eff = eff + ucharge(rj2,roij2,2,2)

    !H11 H22
    xij = abs( X(j,4) - xi )
    yij = abs( Y(j,4) - yi )
    zij = abs( Z(j,4) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
    eff = eff + ucharge(rj2,roij2,2,2)

    !H12
    xi = X(i,4)
    yi = Y(i,4)
    zi = Z(i,4)

    !H12, M2
    xij = abs( X(j,2) - xi )
    yij = abs( Y(j,2) - yi )
    zij = abs( Z(j,2) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
    eff = eff + ucharge(rj2,roij2,2,1)

    !H12 H21
    xij = abs( X(j,3) - xi )
    yij = abs( Y(j,3) - yi )
    zij = abs( Z(j,3) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
  
    rj2 = xij*xij + yij*yij + zij*zij
    eff = eff + ucharge(rj2,roij2,2,2)

    !H12 H22
    xij = abs( X(j,4) - xi )
    yij = abs( Y(j,4) - yi )
    zij = abs( Z(j,4) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
    eff = eff + ucharge(rj2,roij2,2,2)

      end do
    if( nwalls > 0 ) ewf = ewf + uwf(zi)
    if( nwalls == 2) ewf = ewf + uwf(bh - zi)

end do
zi = Z(Nmol,5)

if( nwalls > 0 ) ewf = ewf + uwf(zi)
if( nwalls == 2) ewf = ewf + uwf(bh - zi)

! ** To calculate energy of water + Metal ion

call ljmoleculeion(ioneff0,ionewf0)
call ljmoleculeion1(ioneff1,ionewf1)

        if(mutation) then
           ioneff=(1-lambda)*ioneff0 + (lambda*ioneff1)
          ionewf=(1-lambda)*ionewf0 + (lambda*ionewf1)
        else
             ioneff = ioneff0
             ionewf = ionewf0
        end if
 
eff = eff + ioneff
ewf = ewf + ionewf

return

end subroutine ljinteract

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

subroutine ljmoleculeion(ioneff,ionewf)

Use xyz
Use sp
Use lj

implicit none                                                                                

real        :: ioneff, ioneff1, ionewf,uc1, uc2, uc3

integer        :: i, j, etotal

real        :: xij, yij, zij

real        :: dx, dy, dz

real        :: xi, yi, zi

real        :: rij2, rj2, xcmij, ycmij, zcmij, roij2

real, external    :: uff, uwf, ucharge, uljion, uljion1,uchargeion

!****************************************************************

ioneff = 0.0
ionewf = 0.0

if( Nmol == 0 ) return

do j = 1, Nmol-1
  
    xij = abs( X(j,5) - Xr )
    yij = abs( Y(j,5) - Yr )
    zij = abs( Z(j,5) - Zr )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
  
    rij2 = xij*xij + yij*yij + zij*zij
  
  !ion-O vander wall interaction  

    xij = abs( X(j,1) - Xr )
    yij = abs( Y(j,1) - Yr )
    zij = abs( Z(j,1) - Zr )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
  
    roij2 = xij*xij + yij*yij + zij*zij
      
    if( roij2 < rcutsq ) then
    ioneff = ioneff + uljion(roij2)
    end if
  
   !ion-M coulombic interaction

    xij = abs( X(j,2) - Xr )
    yij = abs( Y(j,2) - Yr )
    zij = abs( Z(j,2) - Zr )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
    ioneff = ioneff + ucharge(rj2,roij2,3,1)

   !ion-H1 coulombic interaction
      
    xij = abs( X(j,3) - Xr )
    yij = abs( Y(j,3) - Yr )
    zij = abs( Z(j,3) - Zr )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh

    rj2 = xij*xij + yij*yij + zij*zij
    ioneff = ioneff + ucharge(rj2,roij2,3,2)
        
   !ion-H2 coulombic interaction

    xij = abs( X(j,4) - Xr )
    yij = abs( Y(j,4) - Yr )
    zij = abs( Z(j,4) - Zr )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
    ioneff = ioneff + ucharge(rj2,roij2,3,2)

end do

    if( nwalls > 0 ) ionewf = ionewf + uwf(Zr)
    if( nwalls == 2) ionewf = ionewf + uwf(bh - Zr)

return

end subroutine ljmoleculeion

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

subroutine ljmoleculeion1(ioneff1,ionewf1)

Use xyz
Use sp
Use lj

implicit none

real        :: ioneff1, ionewf1, uc1, uc2, uc3

integer        :: i, j, etotal

real        :: xij, yij, zij

real        :: dx, dy, dz

real        :: xi, yi, zi

real        :: rij2, rj2, xcmij, ycmij, zcmij, roij2

real, external    :: uff, uwf, ucharge, uljion1, uchargeion

!****************************************************************

ioneff1 = 0.0
ionewf1 = 0.0

if( Nmol == 0 ) return
do j = 1, Nmol-1
  
     xij = abs( X(j,5) - Xr )
     yij = abs( Y(j,5) - Yr )
     zij = abs( Z(j,5) - Zr )

     if( xij > bs - xij ) xij = xij - bs
     if( yij > bs - yij ) yij = yij - bs
     if( zij > bh - zij ) zij = zij - bh
  
     rij2 = xij*xij + yij*yij + zij*zij
      
   !ion-O vander wall interaction  
    xij = abs( X(j,1) - Xr )
    yij = abs( Y(j,1) - Yr )
    zij = abs( Z(j,1) - Zr )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
  
    roij2 = xij*xij + yij*yij + zij*zij
        if( roij2 < rcutsq ) then
    ioneff1 = ioneff1 + uljion1(roij2)
    end if
  
    !ion-M coulombic interaction
    xij = abs( X(j,2) - Xr )
    yij = abs( Y(j,2) - Yr )
    zij = abs( Z(j,2) - Zr )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
    ioneff1 = ioneff1 + ucharge(rj2,roij2,3,1)

   !ion-H1 coulombic interaction
    xij = abs( X(j,3) - Xr )
    yij = abs( Y(j,3) - Yr )
    zij = abs( Z(j,3) - Zr )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh

    rj2 = xij*xij + yij*yij + zij*zij
    ioneff1 = ioneff1 + ucharge(rj2,roij2,3,2)

   !ion-H2 coulombic interaction
    xij = abs( X(j,4) - Xr )
    yij = abs( Y(j,4) - Yr )
    zij = abs( Z(j,4) - Zr )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh

    rj2 = xij*xij + yij*yij + zij*zij
    ioneff1 = ioneff1 + ucharge(rj2,roij2,3,2)

    end do

if( nwalls > 0 ) ionewf1 = ionewf1 + uwf(Zr)
if( nwalls == 2) ionewf1 = ionewf1 + uwf(bh - Zr)

return

end subroutine ljmoleculeion1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

subroutine ljmolecule(mol, eff, ewf)

Use xyz
Use sp
Use lj

implicit none

real        :: eff, uc1, uc2, uc3, ewf

real        ::eff0, eff1

integer        :: i, j, mol

real        :: xij, yij, zij

real        :: dx, dy, dz

!real        :: xt, yt, zt

real        :: xi, yi, zi

real        :: rij2, rj2, xcmij, ycmij, zcmij, roij2

real, external    :: uff, uwf, ucharge, usflj, uljion, uljion1, uchargeion

!****************************************************************

eff = 0.0
ewf = 0.0
eff0= 0.0
eff1= 0.0

do j = 1, Nmol-1

    if( j == mol ) cycle

    xi = X(mol,5)
    yi = Y(mol,5)
    zi = Z(mol,5)

    xij = abs( X(j,5) - xi )
    yij = abs( Y(j,5) - yi )
    zij = abs( Z(j,5) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
  
    rij2 = xij*xij + yij*yij + zij*zij
  
    xi = X(mol,1)
    yi = Y(mol,1)
    zi = Z(mol,1)

    xij = abs( X(j,1) - xi )
    yij = abs( Y(j,1) - yi )
    zij = abs( Z(j,1) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
  
    roij2 = xij*xij + yij*yij + zij*zij
        if( roij2 < rcutsq ) then
    eff = eff + usflj(roij2)
        end if
  
     !m1
    xi = X(mol,2)
    yi = Y(mol,2)
    zi = Z(mol,2)

     !m1 m2
    xij = abs( X(j,2) - xi )
    yij = abs( Y(j,2) - yi )
    zij = abs( Z(j,2) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh

    rj2 = xij*xij + yij*yij + zij*zij
    eff = eff + ucharge(rj2,roij2,1,1)
              
     !m1 H21
    xij = abs( X(j,3) - xi )
    yij = abs( Y(j,3) - yi )
    zij = abs( Z(j,3) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
    eff = eff + ucharge(rj2,roij2,1,2)
      
     !m1 H22
    xij = abs( X(j,4) - xi )
    yij = abs( Y(j,4) - yi )
    zij = abs( Z(j,4) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
    eff = eff + ucharge(rj2,roij2,1,2)

     !H11
    xi = X(mol,3)
    yi = Y(mol,3)
    zi = Z(mol,3)

     !H11 m2
    xij = abs( X(j,2) - xi )
    yij = abs( Y(j,2) - yi )
    zij = abs( Z(j,2) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
           eff = eff + ucharge(rj2,roij2,2,1)
         
     !H11 H21
    xij = abs( X(j,3) - xi )
    yij = abs( Y(j,3) - yi )
    zij = abs( Z(j,3) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh

    rj2 = xij*xij + yij*yij + zij*zij
           eff = eff + ucharge(rj2,roij2,2,2)
  
     !H11 H22
    xij = abs( X(j,4) - xi )
    yij = abs( Y(j,4) - yi )
    zij = abs( Z(j,4) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
           eff = eff + ucharge(rj2,roij2,2,2)
       
     !H12
    xi = X(mol,4)
    yi = Y(mol,4)
    zi = Z(mol,4)

     !H12, M2
    xij = abs( X(j,2) - xi )
    yij = abs( Y(j,2) - yi )
    zij = abs( Z(j,2) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
        eff = eff + ucharge(rj2,roij2,2,1)
         
    !H12 H21
    xij = abs( X(j,3) - xi )
    yij = abs( Y(j,3) - yi )
    zij = abs( Z(j,3) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
  
    rj2 = xij*xij + yij*yij + zij*zij
    eff = eff + ucharge(rj2,roij2,2,2)
              
    !H12 H22
    xij = abs( X(j,4) - xi )
    yij = abs( Y(j,4) - yi )
    zij = abs( Z(j,4) - zi )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
      
    rj2 = xij*xij + yij*yij + zij*zij
    eff = eff + ucharge(rj2,roij2,2,2)
             
 end do

    ! Code for Interaction of water with Ion(r)

     xij = abs( X(mol,5) - Xr )
         yij = abs( Y(mol,5) - Yr )
         zij = abs( Z(mol,5) - Zr )

         if( xij > bs - xij ) xij = xij - bs
         if( yij > bs - yij ) yij = yij - bs
         if( zij > bh - zij ) zij = zij - bh

         rij2 = xij*xij + yij*yij + zij*zij
           
        ! Ion-O vander wall interaction

        xij = abs( X(mol,1) - Xr )
        yij = abs( Y(mol,1) - Yr )
        zij = abs( Z(mol,1) - Zr )

        if( xij > bs - xij ) xij = xij - bs
        if( yij > bs - yij ) yij = yij - bs
        if( zij > bh - zij ) zij = zij - bh

        roij2 = xij*xij + yij*yij + zij*zij
        if( roij2 < rcutsq ) then
    eff0 = uljion(roij2)
        eff1 = uljion1(roij2)
        end if

    ! Ion-M coulombic interaction

     xij = abs( X(mol,2) - Xr )
    yij = abs( Y(mol,2) - Yr )
    zij = abs( Z(mol,2) - Zr )
  
    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh
        
    rj2 = xij*xij + yij*yij + zij*zij        
    eff0 = eff0 + ucharge(rj2,roij2,3,1)
    eff1 = eff1 + ucharge(rj2,roij2,3,1)

    !ion-H1 coulombic interaction
    xij = abs( X(mol,3) - Xr )
    yij = abs( Y(mol,3) - Yr )
    zij = abs( Z(mol,3) - Zr )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh

    rj2 = xij*xij + yij*yij + zij*zij
    eff0 = eff0 + ucharge(rj2,roij2,3,2)
    eff1 = eff1 + ucharge(rj2,roij2,3,2)
            
    !ion-H2 coulombic interaction
    xij = abs( X(mol,4) - Xr )
    yij = abs( Y(mol,4) - Yr )
    zij = abs( Z(mol,4) - Zr )

    if( xij > bs - xij ) xij = xij - bs
    if( yij > bs - yij ) yij = yij - bs
    if( zij > bh - zij ) zij = zij - bh

    rj2 = xij*xij + yij*yij + zij*zij
    eff0 = eff0 + ucharge(rj2,roij2,3,2)
    eff1 = eff1 + ucharge(rj2,roij2,3,2)
      
    if( nwalls > 0 ) ewf = ewf + uwf(zi)
    if( nwalls == 2) ewf = ewf + uwf(bh - zi)
        eff = eff + (1-lambda)*eff0+(lambda*eff1)

    return

end subroutine ljmolecule

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

function usflj(rij2)

Use lj

implicit none

real        :: usflj, rij2, rij
real, external    :: ulj

select case(iljpot)

    case(1)

        usflj = ulj(rij2)

    case(2)

        usflj = ulj(rij2) - uljcut

    case(3)

        rij = sqrt(rij2)

        usflj = ulj(rij2) - uljcut - (rij - rcut) * upljcut

end select

return

end function usflj

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

function ulj(rij2)

Use lj

implicit none

real    :: ulj, rij2, r2, r6, r12

r2 = 1.0 / rij2
r6 = r2 * r2 * r2
r12 = r6 * r6

ulj = 4.0 * (r12 - r6)

return

end function ulj

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

function uljion(rij2)

Use lj

implicit none

real    :: uljion, rij2, r2, r6, r12

real    :: sigmar2, sigmar6, sigmar12

sigmar2 = ionsigmar * ionsigmar
sigmar6 = sigmar2 * sigmar2 * sigmar2
sigmar12= sigmar6 * sigmar6

r2 = 1.0 / rij2
r6 = r2 * r2 * r2
r12 = r6 * r6

uljion = 4.0 *ionepsr* (r12*sigmar12 - r6*sigmar6)

return

end function uljion

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

function uljion1(rij2)

Use lj

implicit none

real    :: uljion1, rij2, r2, r6, r12

real    :: sigmam2, sigmam6, sigmam12

sigmam2 = ionsigmam * ionsigmam
sigmam6 = sigmam2 * sigmam2 * sigmam2
sigmam12= sigmam6 * sigmam6

r2 = 1.0 / rij2
r6 = r2 * r2 * r2
r12 = r6 * r6

uljion1 = 4.0 *ionepsm* (r12*sigmam12 - r6*sigmam6)

return

end function uljion1

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

function uplj(rij)

Use lj

implicit none

real    :: uplj, rij, r2, r6, r12

r2 = 1.0 / (rij * rij)
r6 = r2 * r2 * r2
r12 = r6 * r6

uplj = -24.0 * (2.0*r12 - r6) / rij

return

end function uplj

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!*******************************************

function ucharge(r2,rm2,i,j)
!Use tip4p
Use lj
implicit none

real        :: ucharge,r2,rm2
integer        :: i,j,k
  
!if (r2 .le. 0.16) then
!   ucharge=1.0E100
!else
    if(rm2 <= rcutsq) then
    ucharge = rb * charge(i)*charge(j)/sqrt(r2)
    else
    ucharge=0.0
    end if
end function ucharge


!*****************************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!****************************

function uchargeion(r2,rm2,i,j)
Use lj
implicit none
real            :: uchargeion,r2,rm2
integer         :: i,j,k

        if(rm2 <= rcutsq) then
        uchargeion = 215.8323 * charge(i)*charge(j)/sqrt(r2)
        else
        uchargeion=0.0
        end if
end function uchargeion

!*****************************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

function uwf(z)

Use lj

implicit none

real    :: uwf, z, ar, aa, ap, r, r2, r3, r4, r9

select case(isfpot)

    case(1)

        r = wsig / z
        r3 = r * r * r
        r9 = r3 * r3 * r3

        aa = r3
        ar = 2.0 / 15.0 * r9

        uwf = weps * (ar - aa)

    case(2)

        r = wsig / z
        r2 = r * r
        r4 = r2 * r2

        aa = r4
        ar = 2.0 / 5.0 * r4 * r4 * r2
        ap = z + pot2
        ap = pot1 / (ap * ap * ap)

        uwf = weps * (ar - aa - ap)

end select

return

end function uwf

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



FOTRAN program for Displacement of particle and Acceptance of Move using Monte Carlo simulation

Average enrgy calculation involves both Displacement of the selected particle and LJ potential calculation

// Displacement of particle and Acceptance of Move

subroutine displace(success, ihs)

Use sp
Use xyz
Use randmod
Use moves
Use tmmod

implicit none

logical            :: success
integer            :: ihs,i

integer            :: mol

real,dimension(1:5)    :: xold, yold, zold
real,dimension(1:5)    :: xnew, ynew, znew
real            :: dx, dy, dz, xo,yo,zo,xn,yn,zn
real            :: emffnew, emffold, ioneffold, ioneffnew, ioneffold1, ioneffnew1
real            :: emwfnew, emwfold, ionewfnew, ionewfold, ionewfnew1, ionewfold1
real            :: de, dlnpsi

success = .false.
emffnew = 0
emffold = 0
emwfnew = 0
emwfold = 0
ioneffold = 0
ioneffold1 = 0
ioneffnew = 0
ioneffnew1 = 0
ionewfold = 0
ionewfold1 = 0
ionewfnew = 0
ionewfnew1 = 0
pacc = 0.0

if( Nmol == 0 ) return
ihs = 1
if( ran2(Seed) > 0.33 ) ihs = 2

if( ihs == 1 ) then

        dx = 0.0
        dy = 0.0
        dz = ( 2.0 * ran2(Seed) - 1.0 ) * dh * bh

else

        dx = ( 2.0 * ran2(Seed) - 1.0 ) * ds * bs
        dy = ( 2.0 * ran2(Seed) - 1.0 ) * ds * bs
        dz = 0.0

end if

mol = int( Nmol * ran2(Seed) ) + 1

if (mol .eq. Nmol) then
             
    xo = Xr
    yo = yr
    zo = zr

    xn = xo + dx
    yn = yo + dy
    zn = zo + dz

    if( xn > bs )  xn = xn - bs * aint( xn / bs )
        if( yn > bs )  yn = yn - bs * aint( yn / bs )
        if( nwalls == 0 .and. zn > bh ) zn = zn - bh * aint( zn / bh )
      
    if( nwalls > 0  .and. zn > bh )  return
    if( xn < 0.0 )  xn = xn - bs * aint( xn / bs - 1.0 )
    if( yn < 0.0 )  yn = yn - bs * aint( yn / bs - 1.0 )
    if( nwalls == 0 .and. zn < 0.0 )  zn = zn - bh * aint( zn / bh - 1.0 )
    if( nwalls > 0  .and. zn < 0.0 )  return

        call ljmoleculeion(ioneffold,ionewfold)
        call ljmoleculeion1(ioneffold1,ionewfold1)

        ioneffold = (1-lambda) * ioneffold + (lambda * ioneffold1)

        Xr = xn
        Yr = yn
        Zr = zn

        call ljmoleculeion(ioneffnew,ionewfnew)
        call ljmoleculeion1(ioneffnew1,ionewfnew1)

        ioneffnew = (1-lambda) * ioneffnew + (lambda * ioneffnew1)

    de = (ioneffnew + ionewfnew ) - (ioneffold + ionewfold)
        
else
    xold(:) = X(mol,:)
    yold(:) = Y(mol,:)
    zold(:) = Z(mol,:)

    xnew = xold + dx
    ynew = yold + dy
    znew = zold + dz

    do i=1,5
        if( xnew(i) > bs )  xnew(i) = xnew(i) - bs * aint( xnew(i) / bs )
        if( ynew(i) > bs )  ynew(i) = ynew(i) - bs * aint( ynew(i) / bs )
        if( nwalls == 0 .and. znew(i) > bh ) znew(i) = znew(i) - bh * aint( znew(i) / bh )
        if( nwalls > 0  .and. znew(i) > bh )  return
                          
        if( xnew(i) < 0.0 )  xnew(i) = xnew(i) - bs * aint( xnew(i) / bs - 1.0 )
        if( ynew(i) < 0.0 )  ynew(i) = ynew(i) - bs * aint( ynew(i) / bs - 1.0 )
        if( nwalls == 0 .and. znew(i) < 0.0 )  znew(i) = znew(i) - bh * aint( znew(i) / bh - 1.0 )
        if( nwalls > 0  .and. znew(i) < 0.0 )  return

    end do
                      
    call ljmolecule(mol, emffold, emwfold)
      

    X(mol,:) = xnew(:)
    Y(mol,:) = ynew(:)
    Z(mol,:) = znew(:)

    call ljmolecule(mol, emffnew, emwfnew)
     
    de = ( emffnew + emwfnew ) - ( emffold + emwfold )
     
endif


dlnpsi = - beta * de

pacc = -beta * de

if ( de > 2160.0) then

 !write(*,*)' problem is in displaces stop stop stop stopstop*************************',mol
  write(*,*)' change',ihs,dx,dy,dz,de
  write(*,*) '  energies', emffnew,emffold

!  write(*,*)' xold', xold
 ! write(*,*)' yold', yold
  !write(*,*)' zold', zold


  !write(*,*)' xnew', xnew
  !write(*,*)' ynew', ynew
  !write(*,*)' znew', znew
 
 end if
if( pacc < 0.0 ) then

    pacc = exp(pacc)

else

    pacc = 1.0

end if

if( log( ran2(Seed) ) < dlnpsi ) then  
      
    success = .True.
    !ebff = ebff + emffnew - emffold + ioneffnew - ioneffold
      
    ebff=ebff+de
    ebwf = ebwf + emwfnew - emwfold + ionewfnew - ionewfold
    
else
    if (mol .eq. Nmol) then
        xr = xo
        yr = yo
        zr = zo
    else
        X(mol,:) = xold(:)
        Y(mol,:) = yold(:)
        Z(mol,:) = zold(:)
    endif
  
end if

return

end subroutine displace

Saturday, October 30, 2010

The final control element (Definition and Examples)

The final control element:

This is the hardware element that implements in real life the decision taken by the controller.

The controi valve is the most frequently encountered final control element but not the only one.

Other typical final control elements for a chemical process are :

- Relay switches, providing on-off control,

- variable speed pumps,

- variablle ssppeeeedd compressors.

What is the definition of The controller?(Definition)

The controller

This is the hardware element that has "intelligence". It receives the information from the measuring devices

and decides what action should be taken. The older controllers were of limited ,"intelligence",could

perform very simple operations and implement simple control laws. Today with the increasing usage of

digital computers as controllers the available machine intelligence has expanded tremendously, and very

complicated control laws can be implemented.

What are Transmission lines?

They are used to carry the measurement signal from the measuring device to the controller. In the past the

transmission lines were pneumatic (compressed air or compressed liquids) but with the advent of

the electronic analog controllers and especially the expanding usage of digital computers for control, the

transmission lines carry electric signals.

Many times the measurement signal coming out from a measuring device is very weak, and it cannot be

transmitted over a long distance. In such cases the transmission lines are equipped with amplifiers which

raise the level of the signal. For example, the output of a thermocouple is of the order of a few mil 3. iv0I.t

s . Before it is transmitted to the controller, it is amplified to the level of a few volts.

What is Transducers or transmitters(Definition and examples)

Transducers or transmitters:

Many measurements cannot be used for control until they are converted to physical quantities (like electric

voltage or current, or a pneumatic signal, i.e. compressed air or liquid) which can be transmitted easily.

The transducers or transmitters are used for that purpose.For example, the Strain Gauges are metallic

conductors which change their resistance when subjected to mechanical strain. Thus, they can be used to

convert a pressure signal to an electric one.
 

Types of Controllers,Fee-dba-ck control configuration,Inferential control configuration,Feedforward control configuration

Fee-dba-ck control configuration:

Uses direct measurements of the controlled variables to adjust the values of the manipulated variables. The objective is to keep the controlled variables at desired levels

Inferential control configuration:

Uses secondary measurements, because the controlled variables are not measured, to adjust the values of the manipulated variablesThe objective here is to keep the (unmeasured) controlled variables at desired levels.

The estimator uses the values of the available measured outputs, along with the material and energy balances that govern the process, to compute mathematically (estimate) the values of the unmeasured controlled variables.


These estimates in turn are used by the controller to adjust the values of the manipulated variables.

Feedforward control configuration

Uses direct measurements of the disturbances to adjust the values of the manipulated variablesThe objective here is to keep the values of the controlled output variables at desired levels.

ELEMENTS OF THE DESIGN OF A CONTROL SYSTEM

Let us see now what are the basic questions that we must ask while attempting to design a control system that will satisfy the control needs for a chemical process.

1. Define Control Objectives


The central element in any control configuration is the process that we
want to control. The first question that is raised by the control designeri is:

- Ensuring the stability of the process, or



- suppressing the influence of external disturbances, or


- optimizing the economic performance of a plant, or

- combination of the above

At the beginning the control objectives are 'defined qualitatively and subsequently they are quantifi'ed, usually in terms of the output variables.

2.Select Measurements

Whatever are our control objectives, we need some means to monitor the

performance of the chemical process. This is done by measuring the values of certain processing variables (temperatures, pressures, concentrations, flowrates, etc.).

It is self-evident that we would like to monitor directly the variables thatre present our control objectives, and this is what is done whenever possible. Such measurements are called primary measurements.

3.Select Manipulated Variables

Once the control objectives have been specified and the various measurements identified, the next question is how do we effect a change on the process, i.e.

Usually in a process we have a number of available input variables which can be adjusted freely. Which ones we select' to use as manipulated variables is a crucial question as the choice will affect the quality of the control actions we take.

4.Select the Control Configuration
After the control objectives, the possible measurements, and the available manipulated variables have been identified, the final problem to be solved is that of defining the control configuration.

5.Design the Controller
In every control configuration, the controller is the active element that receives the information from the measurements and takes appropriate control actions to adjust the values of the manipulated variables.






CLASSIFICATION OF THE VARIABLES IN A CHEMICAL PROCESS

The variables (flowrates, temperatures, pressures, concentrations, etc.) associated with a chemical process are classified into:

a. Input variables, which denote the effect of the surroundings on a chemical process, and

b. output variables, which denote the effect of the process on the surroundings.

The input variables can be further classified into the following categories:


i.Manipulated (or adjustable) variables, if their values :can be adjusted freely by the human operator or a control mechanism and

ii. disturbances, if their values are not the result of adjustment by an operator or a control system.

The output variables are also classified into the following categories:

i. Measured output variables, if their values are known by directly measuring them, and

ii. -unmeasured output variables, if they are not or cannot be measured directly.

CLASSIFICATION OF THE INPUT AND OUTPUT VARIABLES IN A CHEMICAL PROCESS

The input variables can be further classified into the following categories:

1.. Manipulated (or adjustable) variables, if their values :can be adjusted freely by the human operator or a control mechanism and

ii. disturbances, if their values are not the result of adjustment by an operator or a control system.

The output variables are also classified into the following categories:


i. Measured output variables, if their values are known by directly measuring them, and

ii. -unmeasured output variables, if they are not or cannot be measured directly.

What are the manipulated variables to be used in order to control a chemical process?

"What are the manipulated variables to be used in order to control a chemical process?"

Usually in a process we have a number of available input variables which can be adjusted freely. Which ones we select' to use as manipulated variables is a crucial question as the choice will affect the quality of the control actions we take.

What are the operational objectives that a control system is called to achieve?

The answer to this question determines the so-called control objectives. They may have to do with:

- Ensuring the stability of the process, or

- suppressing the influence of external disturbances, or

- optimizing the economic performance of a plant, or

' - combination of the above.

At the beginning the control objectives are 'defined qualitatively and subsequently they are quantifi'ed,

usually in terms of the output variables.

Integrated parts(requirements) of a Chemical Process plant(safety,production specification,Environmental regulations,operational constraints,Economics)

A chemical plant is an arrangement of processing units (reactors, heat exchangers, pumps, distillation columns, absorbers, evaporators, tanks, etc.), integrated with each other in a systematic and rational manner. The plant's overall objective is to convert certain raw materials (input feedstock) into desired products using available sources of energy, in the most economic,way.

During its operation, a chemical plant must satisfy several requirements imposed by its designers and the general technical, economic and social conditions in the presence of ever-changing external influences (disturbances).

Among such requirements are the following:

Safety: The safe operation of a chemical process is a primary requirement, for the well being of the people in the plant and its continued contribution to the economic development. Thus, the operating pressures, temperatures, concentration of chemicals, etc. should always be within allowable limits. For example, if a reactor has been designed to operate at a pressure up to 100 psig, we should have a control system that will maintain the pressure below to avoid the development of plant.

Production specifications: The plant should produce the desired amounts and quality of the final products. For example, we may require the production of  two million pounds of ethylene per day, of 99.5% purity, from an ethylene plant. Therefore, a control system is needed to ensure that the production level (2 million pounds per day) and the purity specifications (99.5% ethylene) are satisfied.

Environmental regulations: Various federal and state laws may specify that the temperatures, concentrations of chemicals and flowrates of the effluents from a plant be within certain limits. Such regulations for example exist on the amounts of SO2 that a plant can eject to the atmosphere, and the quality of water returned to a river or a lake.

Operational constraints: The various types of equipments used in a chemical plant have constraints inherent to their operation. Such constraints should be satisfied throughout the operation of a plant. For example, pumps must maintain a certain net positive suction head; tanks should not overflow or go dry; distillation columns should not be flooded: the temperature in a catalytic reactor should not exceed an upper limit since the catalyst will be destroyed. Control systems are needed to satisfy all these operational constraints.

Economics: The operation of a plant must conform with the market conditions, i.e. the availability of raw materials and the demand of the final products. Furthermore, it should be as economic as possible in its utilization of raw materials, energy, capital and human labor. Thus, it is required that the operating conditions are controlled at given optimum levels of minimum operating cost, or maximum profit; etc



Lennard Jones potentials (Definition&formula) caculation and it's applications(LJ potentials)

Definition:
 The Lennard-Jones potential (also referred to as the L-J potential, 6-12 potential or, less commonly, 12-6 potential) is a mathematically simple model that describes the interaction between a pair of neutral atoms or molecules. A form of the potential was first proposed in 1924 by John Lennard-Jones.









where ε = Depth of the potential well
 σ = (finite) Distance at which the inter-particle potential is zero
 r = Distance between the particles.

These parameters can be fitted to reproduce experimental data or accurate quantum chemistry calculations. The r−12 term describes Pauli repulsion at short ranges due to overlapping electron orbitals and the r−6 term describes attraction at long ranges (van der Waals force, or dispersion force).

Applications:

The Lennard-Jones 12-6 (LJ) potential is an important model for exploring the  behaviour of simple fluids, and has been used to study vapour-liquid and liquidliquid equilibria, melting, behaviour of fluids confined within small pores, small atomic clusters, a variety of surface and transport properties, and so on. It has also been widely used as a reference fluid in perturbation treatments for more complex fluids. In many ways, the LJ model is oversimplified ; for example, the form of the repulsive part of the potential is incorrect, being insufficiently repulsive at short distances, the C6 dispersion coefficient is too high while higher dispersion coefficients are neglected, and its application to dense systems neglects three-body forces completely. Nevertheless, it captures much of the essential physics of simple fluids.

The attractive long-range potential, however, is derived from dispersion interactions. The L-J potential is a relatively good approximation and due to its simplicity is often used to describe the properties of gases, and to model dispersion and overlap interactions in molecular models. It is particularly accurate for noble gas atoms and is a good approximation at long and short distances for neutral atoms and molecules. On the graph, Lennard-Jones potential for argon dimer is shown. Small deviation from the accurate empirical potential due to incorrect short range part of the repulsion term can be seen.



















LJ potential for Argon dimer is as shown in the diagram.

Wednesday, October 27, 2010

Types of Ideal reactors(Steady state,plug flow and mixed flow(PFR and MFR) and Batch Reactors and composition change)

Simple Flow reactors

Ideal reactors have three ideal flow or contacting patterns. We show these in Fig, and we very often try to make real reactors approach these ideals as closely as possible.

We particularly like these three flow or reacting patterns because they are easy to treat (it is simple to find their performance equations) and because one of them often is the best pattern possible (it will give the most of whatever it is we want). Later we will consider recycle reactors, staged reactors, and other flow pattern combinations, as well as deviations of real reactors from these ideals.






Figure-1
Figure-1 shows the Batch reactor and in this reactor Uniform composition, everywhere in the reactor but of course the, composition changes with time.

Figure-2
This shows one of the steady state reactor known as plug flow reactor.


Fluid passes through the reactor, with no mixing of earlier and later entering fluid and with no overtaking It is as if the fluid moved in single file through the reactor.

Figure-3
This shows one of the steady state reactor known as Mixed flow reactor (MFR)

Uniformly mixed, same everywhere within the reactor and at the exit.




Thermal conductivity calculations, experiments, molecular simulations

Nowadays various experimental procedures are there to calculate the thermal conductivity of various materials using various techniques. Th...

About Me

COTACT: studymaterialforall@gmail.com