Example #1
0
PhysicalUnits PhysicalUnitsFactory_neutron_star::
BuildPhysicalUnits()
{
  const double Density = 1e13;        // gm/cm^3
  const double V       = LIGHT_SPEED; // cm/s
  const double Length  = 1e2;         // cm
  const double Mass    = Density * pow(Length, 3.0);
  const double Time    = Length / V;

  return PhysicalUnits(Length, Mass, Time);
}
Example #2
0
PhysicalUnits PhysicalUnitsFactory_MeV_gm_s::
BuildPhysicalUnits()
{
  const double E      = MEV_TO_ERG; // erg
  const double Mass   = 1.0;        // gm
  const double Length = 1.0;        // cm
  const double V      = sqrt(E/Mass);
  const double Time   = Length / V;

  return PhysicalUnits(Length, Mass, Time);
}
Example #3
0
int CALL RadFldUnitsSize(int* OutSize)
{
	PhysicalUnits();

	int ErrStat = ioBuffer.OutErrorStatus();
	if(ErrStat > 0) return ErrStat;

	*OutSize = (int)strlen(ioBuffer.OutString());
	ioBuffer.EraseStringBuffer();
	return ErrStat;
}
Example #4
0
int CALL RadFldUnits(char* OutStr)
{
	PhysicalUnits();

	int ErrStat = ioBuffer.OutErrorStatus();
	if(ErrStat > 0) return ErrStat;

	strcpy(OutStr, ioBuffer.OutString());
	ioBuffer.EraseStringBuffer();
	return ErrStat;
}
Example #5
0
PhysicalUnits PhysicalUnitsFactory_erg_c_ms::
BuildPhysicalUnits()
{
  const double E = 1.0;         // erg
  const double V = LIGHT_SPEED; // cm/s
  const double T = 1e-3;        // s

  const double Length = V*T;
  const double Mass   = E / (V*V);
  const double Time   = T;

  return PhysicalUnits(Length, Mass, Time);
}
Example #6
0
PhysicalUnits PhysicalUnitsFactory_cgs::
BuildPhysicalUnits()
{
  return PhysicalUnits(1.0, 1.0, 1.0);
}