Esempio n. 1
0
void simulationInitialize(struct CALModel2D* model) {

	//dichiarazioni
	unsigned int maximum_number_of_emissions = 0;

	//azzeramento dello step dell'AC
	sciara->step = 0;
	sciara->elapsed_time = 0;

	//determinazione numero massimo di passi
	for (unsigned int i = 0; i < sciara->emission_rate.size(); i++)
		if (maximum_number_of_emissions < sciara->emission_rate[i].size())
			maximum_number_of_emissions = sciara->emission_rate[i].size();
	//maximum_steps_from_emissions = (int)(emission_time/Pclock*maximum_number_of_emissions);
	sciara->parameters.effusion_duration = sciara->parameters.emission_time * maximum_number_of_emissions;

	//definisce il bordo della morfologia
	MakeBorder();

	//calcolo a b (parametri viscosit�) c d (parametri resistenza al taglio)
	evaluatePowerLawParams(sciara->parameters.Pr_Tsol, sciara->parameters.Pr_Tvent, sciara->parameters.a, sciara->parameters.b);
	evaluatePowerLawParams(sciara->parameters.Phc_Tsol, sciara->parameters.Phc_Tvent, sciara->parameters.c, sciara->parameters.d);
//	updateVentsEmission(model);

	if (active)
		for (unsigned int k = 0; k < sciara->vent.size(); k++) {
			int xVent = sciara->vent[k].x();
			int yVent = sciara->vent[k].y();
			calAddActiveCell2D(model, yVent, xVent);
		}
	calUpdate2D(model);

}
Esempio n. 2
0
//--------------------------------------------------------------------------
void myBorder(void)
{
  MakeNull();
  if ( user_limiter ) {
    inf.s_limiter = LMT_THIN;
    MakeBorder();
  }
  inf.s_limiter = 0;  // fo not output border between method & vars :(
}