[CIG-MC] Viscosity calculation CitComCU questions Viscosity_structures.c

Norm Sleep norm at pangea.stanford.edu
Mon May 14 17:08:31 PDT 2007


I am trying to figure out how to compute viscosity with simple 
exp(-T/T_eta) formula.  Viscosity seems to get computed by several 
similar void routines.  I have been flow charting program and I am 
even more confused.  NOTE: I put in comments when I can track down 
where a routine is called from.

This gets called on start-up

void viscosity_parameters(struct All_variables *E)
// called by void read_initial_settings(struct All_variables *E)

This also seems to get called That is viscosity is set twice????

void get_viscosity_option(struct All_variables *E)
/* called by void common_initial_fields(struct All_variables *E) in 
Instructions.c */



void viscosity_for_system(struct All_variables *E)
// called by void get_viscosity_option(struct All_variables *E)
{
	if(!E->viscosity.update_allowed)
	{
		get_system_viscosity(E, 1, E->EVI[E->mesh.levmax], 
E->VI[E->mesh.levmax]);
	}

	get_system_viscosity(E, 1, E->EVI[E->mesh.levmax], 
E->VI[E->mesh.levmax]);

	return;
}

The second path leads here

void get_system_viscosity(struct All_variables *E, int propogate, 
float *evisc, float *visc)
// called by void viscosity_for_system(struct All_variables *E)
// called by void general_stokes_solver(struct All_variables *E)


This option gets called directly to update viscosity
The if degenerates into the call being made either once or twice???

void setup_plume_problem(struct All_variables *E)

also sets viscosity.


I am bothered that viscosity might get set inconsistently if I mess 
with it especially if I have not found everywhere it can be set.

I am also bothered in that it looks like I can set diffusity, 
conductivity, heat capacity and Rayleigh for example in consistent 
ways.


I will keep trying to figure things out, but the logic of the ways 
viscosity gets computed escapes me.

thank you

Norm



More information about the CIG-MC mailing list