示例#1
0
  //--------------------------------------------------------
  //  Constructor
  //--------------------------------------------------------
  ATC_CouplingEnergy::ATC_CouplingEnergy(string groupName,
                                         double ** & perAtomArray,
                                         LAMMPS_NS::Fix * thisFix,
                                         string matParamFile,
                                         ExtrinsicModelType extrinsicModel)
    : ATC_Coupling(groupName,perAtomArray,thisFix),
      nodalAtomicKineticTemperature_(NULL),
      nodalAtomicConfigurationalTemperature_(NULL)
  {
    // Allocate PhysicsModel 
    create_physics_model(THERMAL, matParamFile);

    // create extrinsic physics model
    if (extrinsicModel != NO_MODEL) {
      extrinsicModelManager_.create_model(extrinsicModel,matParamFile);  
    }

    // Defaults
    set_time();
    bndyIntType_ = FE_INTERPOLATION;
  
    // set up field data based on physicsModel
    physicsModel_->num_fields(fieldSizes_,fieldMask_);

    // set up atomic regulator
    atomicRegulator_ = new Thermostat(this);

    // set up physics specific time integrator and thermostat
    timeIntegrators_[TEMPERATURE] = new ThermalTimeIntegrator(this,TimeIntegrator::GEAR);

    // default physics
    temperatureDef_ = KINETIC;

    // output variable vector info:
    // output[1] = total coarse scale thermal energy
    // output[2] = average temperature
    vectorFlag_ = 1;
    sizeVector_ = 2;
    scalarVectorFreq_ = 1;
    extVector_ = 1;
    if (extrinsicModel != NO_MODEL)
      sizeVector_ += extrinsicModelManager_.size_vector(sizeVector_);
  }
示例#2
0
  ATC_TransferThermal::ATC_TransferThermal(string groupName,
                                           string matParamFile,
                                           ExtrinsicModelType extrinsicModel)
    : ATC_Transfer(),
      thermostat_(this),
      pmfcOn_(false)
  {
    // assign default "internal" group
    int igroup = lammpsInterface_->find_group(groupName.c_str());
    groupbit_ |= lammpsInterface_->group_bit(igroup);
    igroups_.insert(igroup);

    // Allocate PhysicsModel 
    create_physics_model(THERMAL, matParamFile);

    // create extrinsic physics model
    if (extrinsicModel != NO_MODEL) {
      extrinsicModelManager_.create_model(extrinsicModel,matParamFile);  
    }

    simTime_ = 0.;
    integrationType_ = TimeIntegrator::VERLET;
    atomicOutputMask_.insert("temperature");
  
    // set up field data based on physicsModel
    physicsModel_->get_num_fields(fieldSizes_,fieldMask_);

    // output variable vector info:
    // output[1] = total coarse scale thermal energy
    // output[2] = average temperature
    vectorFlag_ = 1;
    sizeVector_ = 2;
    globalFreq_ = 1;
    extVector_ = 1;
    if (extrinsicModel != NO_MODEL)
      sizeVector_ += extrinsicModelManager_.size_vector(sizeVector_);
  }