Esempio n. 1
0
	root = "input"
	rootfolder = "diag_input/"


	# check convergence 
	convergence = rd.read_convergence ( rootfolder + root )
	print 'convergence fraction = %f' % convergence

	# if we are converged, do diagnositcs
	if convergence ==1.0:

		# run py_wind
		os.system ( "py_wind input < input_comms > pywindout")

		# get important values from py_wind
		h1 = rd.thinshell_read ( root + ".ionH1.dat" )	# fraction of h1
		ne = rd.thinshell_read ( root + ".ne.dat" )
		t_e = rd.thinshell_read ( root + ".te.dat" )
		
		if h1 < 0.02: # check if the model is ionised
			# now append the values for hydrogen density, 
			# ne and electron temp as well as BB temp
			h1_list.append (h1)
			ne_list.append( ne )
			t_e_list.append( t_e )
			t_bb.append(tstar)

			# now append some important macro atom values to array

			if mode == MACRO or MACRO_ISO:
Esempio n. 2
0
    os.system('py76c_dev input > output')



    # run py_wind

    os.system('py_wind input < input_comms > pywindout')




    # now get the key values from the pywind files

    root = 'input'

    h1 = rd.thinshell_read(root + '.ioncH1.dat')
    ne = rd.thinshell_read(root + '.ne.dat')
    t_e = rd.thinshell_read(root + '.te.dat')


    rootfolder = 'diag_input/'


    convergence = rd.read_convergence(rootfolder + root)
  
    print '\nconvergence fraction = %f' % convergence

    # now append some important values to array
    # we only want to append if the model has converged!

    if mode == MACRO and convergence == 1.0: