parameters: (lmp)
return_statement: return
docstring: Compute the moduli and print everything to screen
docstring_summary: Compute the moduli and print everything to screen
docstring_tokens: Compute the moduli and print everything to screen
function: def postprocess_and_output(lmp):
      """Compute the moduli and print everything to screen """
  
      # Output final values
      c11all = lmp.variables["C11"].value
      c22all = lmp.variables["C22"].value
      c33all = lmp.variables["C33"].value
  
      c12all = 0.5*(lmp.variables["C12"].value + lmp.variables["C21"].value)
      c13all = 0.5*(lmp.variables["C13"].value + lmp.variables["C31"].value)
      c23all = 0.5*(lmp.variables["C23"].value + lmp.variables["C32"].value)
  
      c44all = lmp.variables["C44"].value
      c55all = lmp.variables["C55"].value
      c66all = lmp.variables["C66"].value
  
      c14all = 0.5*(lmp.variables["C14"].value + lmp.variables["C41"].value)
      c15all = 0.5*(lmp.variables["C15"].value + lmp.variables["C51"].value)
      c16all = 0.5*(lmp.variables["C16"].value + lmp.variables["C61"].value)
  
      c24all = 0.5*(lmp.variables["C24"].value + lmp.variables["C42"].value)
      c25all = 0.5*(lmp.variables["C25"].value + lmp.variables["C52"].value)
      c26all = 0.5*(lmp.variables["C26"].value + lmp.variables["C62"].value)
  
      c34all = 0.5*(lmp.variables["C34"].value + lmp.variables["C43"].value)
      c35all = 0.5*(lmp.variables["C35"].value + lmp.variables["C53"].value)
      c36all = 0.5*(lmp.variables["C36"].value + lmp.variables["C63"].value)
  
      c45all = 0.5*(lmp.variables["C45"].value + lmp.variables["C54"].value)
      c46all = 0.5*(lmp.variables["C46"].value + lmp.variables["C64"].value)
      c56all = 0.5*(lmp.variables["C56"].value + lmp.variables["C65"].value)
  
      # Average moduli for cubic crystals
      c11cubic = (c11all + c22all + c33all)/3.0
      c12cubic = (c12all + c13all + c23all)/3.0
      c44cubic = (c44all + c55all + c66all)/3.0
  
      bulkmodulus = (c11cubic + 2*c12cubic)/3.0
      shearmodulus1 = c44cubic
      shearmodulus2 = (c11cubic - c12cubic)/2.0
      poisson_ratio = 1.0/(1.0 + c11cubic/c12cubic)
  
      # print results to screen
      print("=========================================")
      print("Components of the Elastic Constant Tensor")
      print("=========================================")
  
      print("Elastic Constant C11all = {} GPa".format(c11all))
      print("Elastic Constant C22all = {} GPa".format(c22all))
      print("Elastic Constant C33all = {} GPa".format(c33all))
  
      print("Elastic Constant C12all = {} GPa".format(c12all))
      print("Elastic Constant C13all = {} GPa".format(c13all))
      print("Elastic Constant C23all = {} GPa".format(c23all))
  
      print("Elastic Constant C44all = {} GPa".format(c44all))
      print("Elastic Constant C55all = {} GPa".format(c55all))
      print("Elastic Constant C66all = {} GPa".format(c66all))
  
      print("Elastic Constant C14all = {} GPa".format(c14all))
      print("Elastic Constant C15all = {} GPa".format(c15all))
      print("Elastic Constant C16all = {} GPa".format(c16all))
  
      print("Elastic Constant C24all = {} GPa".format(c24all))
      print("Elastic Constant C25all = {} GPa".format(c25all))
      print("Elastic Constant C26all = {} GPa".format(c26all))
  
      print("Elastic Constant C34all = {} GPa".format(c34all))
      print("Elastic Constant C35all = {} GPa".format(c35all))
      print("Elastic Constant C36all = {} GPa".format(c36all))
  
      print("Elastic Constant C45all = {} GPa".format(c45all))
      print("Elastic Constant C46all = {} GPa".format(c46all))
      print("Elastic Constant C56all = {} GPa".format(c56all))
  
      print("=========================================")
      print("Average properties for a cubic crystal")
      print("=========================================")
  
      print("Bulk Modulus = {} GPa".format(bulkmodulus))
      print("Shear Modulus 1 = {} GPa".format(shearmodulus1))
      print("Shear Modulus 2 = {} GPa".format(shearmodulus2))
      print("Poisson Ratio = {}".format(poisson_ratio))
  
      return
function_tokens: def postprocess_and_output ( lmp ) : # Output final values c11all = lmp . variables [ "C11" ] . value c22all = lmp . variables [ "C22" ] . value c33all = lmp . variables [ "C33" ] . value c12all = 0.5 * ( lmp . variables [ "C12" ] . value + lmp . variables [ "C21" ] . value ) c13all = 0.5 * ( lmp . variables [ "C13" ] . value + lmp . variables [ "C31" ] . value ) c23all = 0.5 * ( lmp . variables [ "C23" ] . value + lmp . variables [ "C32" ] . value ) c44all = lmp . variables [ "C44" ] . value c55all = lmp . variables [ "C55" ] . value c66all = lmp . variables [ "C66" ] . value c14all = 0.5 * ( lmp . variables [ "C14" ] . value + lmp . variables [ "C41" ] . value ) c15all = 0.5 * ( lmp . variables [ "C15" ] . value + lmp . variables [ "C51" ] . value ) c16all = 0.5 * ( lmp . variables [ "C16" ] . value + lmp . variables [ "C61" ] . value ) c24all = 0.5 * ( lmp . variables [ "C24" ] . value + lmp . variables [ "C42" ] . value ) c25all = 0.5 * ( lmp . variables [ "C25" ] . value + lmp . variables [ "C52" ] . value ) c26all = 0.5 * ( lmp . variables [ "C26" ] . value + lmp . variables [ "C62" ] . value ) c34all = 0.5 * ( lmp . variables [ "C34" ] . value + lmp . variables [ "C43" ] . value ) c35all = 0.5 * ( lmp . variables [ "C35" ] . value + lmp . variables [ "C53" ] . value ) c36all = 0.5 * ( lmp . variables [ "C36" ] . value + lmp . variables [ "C63" ] . value ) c45all = 0.5 * ( lmp . variables [ "C45" ] . value + lmp . variables [ "C54" ] . value ) c46all = 0.5 * ( lmp . variables [ "C46" ] . value + lmp . variables [ "C64" ] . value ) c56all = 0.5 * ( lmp . variables [ "C56" ] . value + lmp . variables [ "C65" ] . value ) # Average moduli for cubic crystals c11cubic = ( c11all + c22all + c33all ) / 3.0 c12cubic = ( c12all + c13all + c23all ) / 3.0 c44cubic = ( c44all + c55all + c66all ) / 3.0 bulkmodulus = ( c11cubic + 2 * c12cubic ) / 3.0 shearmodulus1 = c44cubic shearmodulus2 = ( c11cubic - c12cubic ) / 2.0 poisson_ratio = 1.0 / ( 1.0 + c11cubic / c12cubic ) # print results to screen print ( "=========================================" ) print ( "Components of the Elastic Constant Tensor" ) print ( "=========================================" ) print ( "Elastic Constant C11all = {} GPa" . format ( c11all ) ) print ( "Elastic Constant C22all = {} GPa" . format ( c22all ) ) print ( "Elastic Constant C33all = {} GPa" . format ( c33all ) ) print ( "Elastic Constant C12all = {} GPa" . format ( c12all ) ) print ( "Elastic Constant C13all = {} GPa" . format ( c13all ) ) print ( "Elastic Constant C23all = {} GPa" . format ( c23all ) ) print ( "Elastic Constant C44all = {} GPa" . format ( c44all ) ) print ( "Elastic Constant C55all = {} GPa" . format ( c55all ) ) print ( "Elastic Constant C66all = {} GPa" . format ( c66all ) ) print ( "Elastic Constant C14all = {} GPa" . format ( c14all ) ) print ( "Elastic Constant C15all = {} GPa" . format ( c15all ) ) print ( "Elastic Constant C16all = {} GPa" . format ( c16all ) ) print ( "Elastic Constant C24all = {} GPa" . format ( c24all ) ) print ( "Elastic Constant C25all = {} GPa" . format ( c25all ) ) print ( "Elastic Constant C26all = {} GPa" . format ( c26all ) ) print ( "Elastic Constant C34all = {} GPa" . format ( c34all ) ) print ( "Elastic Constant C35all = {} GPa" . format ( c35all ) ) print ( "Elastic Constant C36all = {} GPa" . format ( c36all ) ) print ( "Elastic Constant C45all = {} GPa" . format ( c45all ) ) print ( "Elastic Constant C46all = {} GPa" . format ( c46all ) ) print ( "Elastic Constant C56all = {} GPa" . format ( c56all ) ) print ( "=========================================" ) print ( "Average properties for a cubic crystal" ) print ( "=========================================" ) print ( "Bulk Modulus = {} GPa" . format ( bulkmodulus ) ) print ( "Shear Modulus 1 = {} GPa" . format ( shearmodulus1 ) ) print ( "Shear Modulus 2 = {} GPa" . format ( shearmodulus2 ) ) print ( "Poisson Ratio = {}" . format ( poisson_ratio ) ) return