Автор: Пользователь скрыл имя, 16 Июня 2014 в 13:58, магистерская работа
Несмотря на широкую распространенность в природе и исключительно важную роль в самых различных областях науки и техники: от источников света до термоядерного синтеза и нанотехнологий – плазма, исследования которой продолжаются уже второе столетие, остается до конца не понятым объектом. Даже для простейших случаев газового разряда в инертных газах теоретики не могут предложить четкого алгоритма расчета внутренних параметров плазмы и ее эмиссионных характеристик на основе произвольно устанавливаемых экспериментатором факторов (размер среды, напряжение питания, род и давление газа). Тем не менее, не прекращаются попытки построить модели значительно более сложных экзотических плазменных сред. Так в 70-х и начале 80-х годов прошлого века появляются работы, в которых на основе классической статистической механики с использованием численных методов решения соответствующих уравнений методом Монте-Карло исследуются свойства однокомпонентной полностью ионизованной плазмы гелия при температуре около 108 К и плотности вещества 1029 cм-3.
'insert'=>array()
),
'medium'=>array(
'create'=>"CREATE TABLE medium (medium_id int(10) unsigned NOT NULL default '0', medium_gas int(10) unsigned NOT NULL default '0', medium_pressure float(7,3) unsigned default NULL, medium_percentage float(7,1) unsigned default NULL, PRIMARY KEY (medium_id,medium_gas)) TYPE=MyISAM",
'insert'=>array()
),
'medium_gas'=>array(
'create'=>"CREATE TABLE medium_gas (medium_gas_id int(10) unsigned NOT NULL auto_increment, medium_gas_type varchar(255) default NULL, PRIMARY KEY (medium_gas_id)) TYPE=MyISAM",
'insert'=>array()
),
'part'=>array(
'create'=>"CREATE TABLE part (part_id int(10) unsigned NOT NULL auto_increment, part_size_avg float(7,2) unsigned default NULL, part_shape int(10) unsigned default NULL, part_input int(10) unsigned default NULL, part_note text, PRIMARY KEY (part_id)) TYPE=MyISAM",
'insert'=>array()
),
'part_input'=>array(
'create'=>"CREATE TABLE part_input (part_input_id int(10) unsigned NOT NULL auto_increment, part_input_type varchar(255) default NULL, PRIMARY KEY (part_input_id)) TYPE=MyISAM",
'insert'=>array("INSERT INTO part_input VALUES (1,'Не указан')")
),
'part_material'=>array(
'create'=>"CREATE TABLE part_material (part_material_id
int(10) unsigned NOT NULL default '0', part_material_type int(10) unsigned NOT NULL default '0', PRIMARY KEY (part_material_id,part_
'insert'=>array()
),
'part_material_type'=>array(
'create'=>"CREATE TABLE part_material_type (part_material_type_id int(10) unsigned NOT NULL auto_increment, part_material_type_type varchar(255) default NULL, PRIMARY KEY (part_material_type_id)) TYPE=MyISAM",
'insert'=>array()
),
'part_shape'=>array(
'create'=>"CREATE TABLE part_shape (part_shape_id int(10) unsigned NOT NULL auto_increment, part_shape_type varchar(255) default NULL, PRIMARY KEY (part_shape_id)) TYPE=MyISAM",
'insert'=>array("INSERT INTO part_shape VALUES (1,'Не указана')")
),
'power'=>array(
'create'=>"CREATE TABLE power (power_id int(10) unsigned NOT NULL auto_increment, power_shape int(10) unsigned default NULL, power_freq float(7,1) unsigned default NULL, power_voltage float(7,1) unsigned default NULL, power_current float(7,1) unsigned default NULL, power_note text, PRIMARY KEY (power_id)) TYPE=MyISAM",
'insert'=>array()
),
'power_shape'=>array(
'create'=>"CREATE TABLE power_shape (power_shape_id int(10) unsigned NOT NULL auto_increment, power_shape_type varchar(255) default NULL, PRIMARY KEY (power_shape_id)) TYPE=MyISAM",
'insert'=>array("INSERT INTO power_shape VALUES (1,'Не указана')")
),
'results'=>array(
'create'=>"CREATE TABLE results (results_id int(10) unsigned NOT NULL auto_increment, results_image varchar(255) default NULL, results_behaviour varchar(255) default NULL, results_control_static varchar(255) default NULL, results_control_dynamic varchar(255) default NULL, results_measurement varchar(255) default NULL, results_evaluation varchar(255) default NULL, results_note text, PRIMARY KEY (results_id)) TYPE=MyISAM;",
'insert'=>array()
),
'tube'=>array(
'create'=>"CREATE TABLE tube (tube_id int(10) unsigned NOT NULL auto_increment, tube_cathode_type int(10) unsigned default NULL, tube_cathode_square float(7,1) unsigned default NULL, tube_anode_square float(7,1) unsigned default NULL, tube_cathode_material int(10) unsigned default NULL, tube_anode_material int(10) unsigned default NULL, tube_electrode_distance float(7,1) unsigned default NULL, tube_diameter float(7,1) unsigned default NULL, tube_note text, PRIMARY KEY (tube_id)) TYPE=MyISAM",
'insert'=>array()
),
'tube_electrode_material'=>
'create'=>"CREATE TABLE tube_electrode_material (electrode_material_id int(10) unsigned NOT NULL auto_increment, electrode_material_type varchar(255) default NULL, PRIMARY KEY (electrode_material_id)) TYPE=MyISAM",
'insert'=>array("INSERT INTO tube_electrode_material VALUES (1,'Не указан')")
),
'who'=>array(
'create'=>"CREATE TABLE who (who_id int(10) unsigned NOT NULL auto_increment, who_engineer int(10) unsigned default NULL, who_org int(10) unsigned default NULL, who_place int(10) unsigned default NULL, who_note text, PRIMARY KEY (who_id)) TYPE=MyISAM",
'insert'=>array()
),
'who_engineer'=>array(
'create'=>"CREATE TABLE who_engineer (who_engineer_id int(10) unsigned NOT NULL auto_increment, who_engineer_lastname varchar(255) default NULL, who_engineer_firstname varchar(255) default NULL, who_engineer_patronymic varchar(255) default NULL, PRIMARY KEY (who_engineer_id)) TYPE=MyISAM",
'insert'=>array("INSERT INTO who_engineer VALUES (1,NULL,'Не','указан')")
),
'who_org'=>array(
'create'=>"CREATE TABLE who_org (who_org_id int(10) unsigned NOT NULL auto_increment, who_org_type varchar(255) default NULL, PRIMARY KEY (who_org_id)) TYPE=MyISAM",
'insert'=>array("INSERT INTO who_org VALUES (1,'Не указана')")
),
'who_place'=>array(
'create'=>"CREATE TABLE who_place (who_place_id int(10) unsigned NOT NULL auto_increment, who_place_type varchar(255) default NULL, PRIMARY KEY (who_place_id)) TYPE=MyISAM",
'insert'=>array("INSERT INTO who_place VALUES (1,'Не указано')")
)
);
}
}
?>
<?
require_once("module/class/
$main=new Main();
switch ($a) {
default: // show
$body.=$main->ShowMain();
break;
}
?>
<?
class Main {
//////////////////////////////
// Главная
//////////////////////////////
function GetRules() {
$rules['show']=array('title'=>
return $rules;
}
function GetCreateTable () {
return array(
'main'=>array(
'create'=>"",
'insert'=>array()
)
);
}
function ShowMain($only_main=true) {
global $logged_gid, $setup;
if (!$setup->AccessAllow($setup->
else $deny=false;
$main=NULL;
$main['center']=""; $main['left']=""; $main['right']="";
if ($only_main) {
if ($deny) return parse_file("theme/deny.htm");
require_once("module/class/
$article=new Article();
$articles=$article->
return parse_file("theme/main/
} else {
if ($deny) return array('left'=>"", 'right'=>"");
return $main;
}
}
}
?>
<?
require_once("module/class/
$search=new Search();
$perm_show=$setup->
$deny=false;
switch ($perm_show) {
case "deny":
$deny=true;
break;
}
if ($deny) {
$body.=parse_file("theme/deny.
safe_exit();
}
if (isset($_GET['p'])) {
settype($_GET['p'], "integer");
$p=$_GET['p'];
} else $p=0;
switch ($a) {
case "find":
$body.=$search->ShowFind($p?$
break;
default: // show
$body.=$search->ShowSearch();
break;
}
?>
<?
class Search {
//--------//
// Поиск //
//--------//
function GetRules() {
$rules['show']=array('title'=>
return $rules;
}
function GetCreateTable() {
return array(
'search'=>array(
'create'=>"",
'insert'=>array()
)
);
}
function PrepareText(&$text, &$find) {
$find=NULL;
$text=preg_replace("/\s+/", " ", $text);
$symbols=explode(" ", "/ ^ $ . [ ] | ( ) ? * + { } -");
foreach ($symbols as $symbol) {
$text=str_replace($symbol, "\\".$symbol, $text);
}
$words=explode(" ", $text);
foreach($words as $word) {
$word=trim($word);
if (!$word) continue;
$find[]=$word;
}
$text=implode("|", $find);
$text="/$text/Usi";
if (@preg_match($text, "a")!==false) return true;
else return false;
}
function ShowSearch($set=NULL) {
global $setup;
$choise_set=array("10", "20", "30", "40", "50");
$onpage="";
foreach($choise_set as $value) {
$onpage.="<OPTION value=\"$value\" ".($set['onpage']==$value?"
}
return parse_file("theme/search/show.
}
function ShowFind($p=1) {
$set=NULL;
$set['text']=$text=strprep($_
if (isset($_GET['onpage'])) {
settype($_GET['onpage'], "integer");
$onpage=$set['onpage']=$_GET['
} else $onpage=$set['onpage']=10;
$new_search=$this->ShowSearch(
$i=0; $body="";
if (trim($text)) {
if ($this->PrepareText($text, $highlight)) {
global $setup, $logged_gid;
require_once("module/class/
$article=new Article();
$body.=$article->
if (!$count) $error="К сожалению, по вашему запросу ничего не найдено.";
} else $error="Неверная строка запроса.";
} else $error="Вы не ввели строку запроса.";
if (isset($error) && ($error)) return $new_search.parse_file("theme/
else {
$pages=get_pages_link($onpage, $count, ".?t=search&a=find&text=".
return $new_search.parse_file("theme/
}
}
}
?>
<?
$perm_edit=$setup->
if ($perm_edit=="deny") {
$body.=parse_file("theme/deny.
safe_exit();
}
if (isset($_GET['sid'])) {
settype($_GET['sid'], "integer");
$sid=$_GET['sid'];
} else $sid=0;
if (isset($_GET['c'])) $c=$_GET['c']; else $c="";
if (isset($_GET['asid'])) $asid=(int) $_GET['asid'];
else $asid=NULL;
if (isset($_GET['gid'])) {
settype($_GET['gid'], "integer");
$gid=$_GET['gid'];
} else $gid=0;
switch ($a) {
case "groups":
$body.=$setup->ShowSetup();
$body.=$setup->ShowGroups("
break;
case "addgrp":
$body.=$setup->ShowSetup();
$body.=$setup->ShowGroups("
$body.=$setup->AddGroup();
break;
case "insgrp":
$body.=$setup->InsertGroup();
break;
case "editgrp":
$body.=$setup->ShowSetup();
$body.=$setup->ShowGroups("
$body.=$setup->EditGroup($gid)
break;
case "updgrp":
$body.=$setup->UpdateGroup($
break;
case "delgrp":
$body.=$setup->DeleteGroup($
break;
case "access":
$body.=$setup->ShowSetup();
$body.=$setup->ShowSections("
if ($sid) $body.=$setup->EditAccess($
break;
case "saveaccess":
$body.=$setup->SaveAccess($
break;
case "main":
$body.=$setup->ShowSetup();
$body.=$setup->EditMain();
break;
case "updmain":
$body.=$setup->UpdateMain();
break;
case "settings":
$body.=$setup->ShowSetup();
$body.=$setup->EditSettings();
break;
case "updset":
$body.=$setup->UpdateSettings(
break;
case "sections":
$body.=$setup->ShowSetup();
switch ($c) {
case "up": $body.=$setup->UpSection($sid)
case "down": $body.=$setup->DownSection($
default: $body.=$setup->ShowSections(""
}
break;
case "editabout":
$body.=$setup->EditAbout();
break;
case "updabout":
$body.=$setup->UpdateAbout();
break;
default: // show
$body.=$setup->ShowSetup();
break;
}
?>
<?
class Setup {
//-----------//
// Настройки //
//-----------//
function GetCreateTable() {
$modules=get_modules();
unset($insert_sections); $id=1;
foreach ($modules as $module=>$title) {
if ($module=="setup.php") $setup_section=$id;
if ($module=="user.php") $user_section=$id;
if ($module=="main.php") $main_section=$id;
$insert_sections[]="INSERT INTO section VALUES ('$id', '$title', '$module', '$id')";
$id++;
}
return array(
'grp'=>array(
'create'=>"
CREATE TABLE grp (
gname varchar(255) default NULL,
gid int(10) unsigned NOT NULL auto_increment,
PRIMARY KEY (gid)
) TYPE=MyISAM
",
'insert'=>array(
"INSERT INTO grp VALUES ('Администратор', 1)",
"INSERT INTO grp VALUES ('Гость', 2)",
"INSERT INTO setup VALUES ('admin_id', 1)",
"INSERT INTO setup VALUES ('register_id', 1)",
"INSERT INTO setup VALUES ('guest_id', 2)",
"INSERT INTO setup VALUES ('title', 'Страница')",
"INSERT INTO setup VALUES ('about', 'Информация о проекте.')"
)
),
'section'=>array(
'create'=>"
CREATE TABLE section (
sid int(10) unsigned NOT NULL auto_increment,
name varchar(255) default NULL,
module varchar(255) default NULL,
pos int unsigned default NULL,
PRIMARY KEY (sid)
) TYPE=MyISAM
",
'insert'=>$insert_sections
),
'access'=>array(
'create'=>"
CREATE TABLE access (
sid int(10) unsigned NOT NULL default '0',
gid int(10) unsigned NOT NULL default '0',
rid int(10) unsigned NOT NULL default '0',
asid int(10) unsigned NOT NULL default '0',
action varchar(31) default '',
perm varchar(31) default '',
title varchar(255) default '',
PRIMARY KEY (sid,gid,rid,asid)
) TYPE=MyISAM
",
'insert'=>array(
"INSERT INTO access VALUES ($setup_section,1,1,'show','
"INSERT INTO access VALUES ($user_section,3,1,'add','
"INSERT INTO access VALUES ($main_section,3,1,'show','
"INSERT INTO access VALUES ($main_section,1,1,'show','
)
),
'view'=>array(
'create'=>"
CREATE TABLE view (
uid int(10) unsigned default NULL,
name varchar(255) default NULL,
id int(10) unsigned default NULL,
date date default NULL,
time time default NULL
) TYPE=MyISAM
",
'insert'=>array()
)
);
}
function ShowSetup() {
return parse_file("theme/setup/setup.
}
function GetRules() {
$space=array('deny'=>"Нет", 'allow'=>"Есть");
$rules['show']=array('title'=>
return $rules;
}
function GetLastUpdate() {
if (isset($GLOBALS['settings']['
isset($GLOBALS['settings']['
{
$date=$GLOBALS['settings']['
$time=$GLOBALS['settings']['
format_date($date, $time);
return "$date в $time.";
} else
return "не известно.";
}
function SetLastUpdate() {
$date=date("Y-m-d");
$time=date("H:i:s");
mquery("UPDATE setup SET value='$date' WHERE setting='last_update_date'");
mquery("UPDATE setup SET value='$time' WHERE setting='last_update_time'");
}
//////////////////////////////
// Права доступа
//////////////////////////////
function AccessAllow($sid, $gid, $action, $asid="") {
if ($gid==$GLOBALS['settings']['
$result=mquery("SELECT sid, action, perm, title FROM access WHERE ".($sid?"sid='$sid' AND ":"")."gid='$gid' ".($action?"AND action='$action' ".($asid?"AND asid='$asid'":""):" ORDER BY sid, rid"));
if (mysql_num_rows($result)) {
if ($action) {
$row=mysql_fetch_assoc($
mysql_free_result($result);
return $row['perm'];
} else {
while ($row=mysql_fetch_assoc($
mysql_free_result($result);
return $access;
}
} else {
mysql_free_result($result);
if ($action) return "deny";
else return array();
}
}
function EditAccess($sid, $asid=NULL) {
$module=str_replace(".php", "",
$this->GetSectionModule($sid))
Информация о работе Создание базы данных экспериментов с плазменным кристаллом