Skip to content

Commit

Permalink
Fix gas pressure inputs in egs_inprz and egs_gui
Browse files Browse the repository at this point in the history
Add an input for gas pressure in egs_gui if medium is a gas.

Disable "medium is gas" check box if a density correction file is used:
in this case density corrections are taken from the file and are not
calculated based on the gasp input value.
  • Loading branch information
blakewalters authored and ftessier committed Jan 24, 2017
1 parent 0520ca4 commit 5e5bb60
Show file tree
Hide file tree
Showing 6 changed files with 258 additions and 172 deletions.
18 changes: 17 additions & 1 deletion HEN_HOUSE/gui/egs_gui/pegs_page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,22 @@ void EGS_PegsPage::densityIcruChanged( bool is_on) {
dc_group->setEnabled( is_on );
rho_group->setEnabled( !is_on );
medtype_cbox->setEnabled( !is_on );
is_gas->setEnabled( !is_on );
enable_gaspEdit();
}

void EGS_PegsPage::enable_gaspEdit()
{
if(is_gas->isChecked() && !dc_icru_check->isChecked()) {
gaspLabel->setEnabled(true);
gaspEdit->setEnabled(true);
gaspUnits->setEnabled(true);
}
else {
gaspLabel->setEnabled(false);
gaspEdit->setEnabled(false);
gaspUnits->setEnabled(false);
}
}

void EGS_PegsPage::medtypeChanged( const QString &s )
Expand Down Expand Up @@ -422,7 +438,7 @@ void EGS_PegsPage::startPegs() {
}
if( comboBox2->currentText() == "kg/m**3" ) rho *= 0.001;//convert to g/cm**3
ts << rho;
if( is_gas->isChecked() ) ts << ",GASP=1.0";
if( is_gas->isChecked() && !dc_icru_check->isChecked() && gaspEdit->text().toFloat()>0.0) ts << ",GASP= " << gaspEdit->text();
ts << ",EPSTFL=" << dc_icru_check->isChecked() << ",IAPRIM="
<< rad_icru_check->isChecked() << ",IRAYL=" << rayleigh_check->isChecked()
<< " &END\n";
Expand Down
1 change: 1 addition & 0 deletions HEN_HOUSE/gui/egs_gui/pegs_page.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public slots:
void outputClosed();
void launchReturned();
void setConfigReader(EGS_ConfigReader *r);
void enable_gaspEdit();

protected:
void init();
Expand Down
Loading

0 comments on commit 5e5bb60

Please sign in to comment.