diff --git a/figures/density.jpg b/figures/density.jpg deleted file mode 100644 index 22185f9..0000000 Binary files a/figures/density.jpg and /dev/null differ diff --git a/figures/drag_distribution.jpg b/figures/drag_distribution.jpg deleted file mode 100644 index 987129e..0000000 Binary files a/figures/drag_distribution.jpg and /dev/null differ diff --git a/figures/pdf_droplet_density.jpg b/figures/pdf_droplet_density.jpg new file mode 100644 index 0000000..ba7cb0e Binary files /dev/null and b/figures/pdf_droplet_density.jpg differ diff --git a/file_sip_raw_mh1.jpg b/file_sip_raw_mh1.jpg deleted file mode 100644 index f33e5ad..0000000 Binary files a/file_sip_raw_mh1.jpg and /dev/null differ diff --git a/fixed_fluid_density_no_fixed_infer_drag_radius_scenario.C b/fixed_fluid_density_no_fixed_infer_drag_radius_scenario.C deleted file mode 100644 index 217da26..0000000 --- a/fixed_fluid_density_no_fixed_infer_drag_radius_scenario.C +++ /dev/null @@ -1,117 +0,0 @@ -//-----------------------------------------------------------------------bl- -//-------------------------------------------------------------------------- -// -// DIP - Droplet Inverse Problem -// -// Copyright (C) 2017 Paul T. Bauman, Matthew Ringuette, David Salac -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the Version 2 GNU General -// Public License as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA -// 02110-1301 USA -// -//-------------------------------------------------------------------------- -//-----------------------------------------------------------------------el- - -// This class -#include - -// DIP -#include -#include - -// QUESO -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// C++ -#include - -namespace DIP -{ - - template - FixedFluidDensityNoFixedInferDragRadiusScenario:: - FixedFluidDensityNoFixedInferDragRadiusScenario( const QUESO::GetPot & input, - const QUESO::BaseEnvironment & queso_env, - const DropletData & data ) - : FixedFluidDensityNoFixedScenarioBase(input,data), - //_n_params(1+this->_data.n_data()) - _n_params(3) - //_n_marg_params(1) - { - // Setup parameter space, domain, and RV - this->_param_space.reset( new QUESO::VectorSpace(queso_env, - "param_space_", - this->_n_params, - NULL) ); - - std::unique_ptr param_mins( this->_param_space->newVector() ); - std::unique_ptr param_maxs( this->_param_space->newVector() ); - - (*param_mins)[0] = this->_rho_d_min; - (*param_mins)[1] = this->_cd_min; - (*param_mins)[2] = this->_r_d_min; - - - (*param_maxs)[0] = this->_rho_d_max; - (*param_maxs)[1] = this->_cd_max; - (*param_maxs)[2] = this->_r_d_max; - - this->_param_domain.reset( new QUESO::BoxSubset("param_domain_", *(this->_param_space), - *param_mins,*param_maxs) ); - - this->_prior_rv.reset( new QUESO::UniformVectorRV("prior_rv_", - *(this->_param_domain)) ); - - this->_likelihood = DropletLikelihood::build_no_marg(*this); - } - - template - void - FixedFluidDensityNoFixedInferDragRadiusScenario:: - eval_model( const VectorType & domain_vector, - VectorType & model_output ) const - { - queso_assert_equal_to(domain_vector.sizeGlobal(), this->_n_params); - // queso_assert_equal_to(marg_vector.sizeGlobal(), this->_n_marg_params); - queso_assert_equal_to(model_output.sizeGlobal(), this->_data.n_data()); - - const double rho_d = this->_rho_d_nom*domain_vector[0]; - //const double _cd = this->_cd*domain_vector[0]; - - - for( unsigned int i = 0; i < this->_data.n_data(); i++ ) - { - const double t = this->_data.time(i); - - const double r_d = this->_data.droplet_radius(i); - - model_output[i] = this->_model.position(this->_rho_f, - rho_d, - r_d, - this->_cd, - t); - } - } - -} // end namespace DIP - -// Instantiate -template class DIP::FixedFluidDensityNoFixedInferDragRadiusScenario; diff --git a/marginalpdf.jpg b/marginalpdf.jpg deleted file mode 100644 index 8a4e990..0000000 Binary files a/marginalpdf.jpg and /dev/null differ diff --git a/fixed_fluid_density_fixed_droplet_radius_position_infer_drag_scenario.C b/model/fixed_fluid_density_fixed_droplet_radius_position_infer_drag_scenario.C similarity index 96% rename from fixed_fluid_density_fixed_droplet_radius_position_infer_drag_scenario.C rename to model/fixed_fluid_density_fixed_droplet_radius_position_infer_drag_scenario.C index d9524e3..a958035 100644 --- a/fixed_fluid_density_fixed_droplet_radius_position_infer_drag_scenario.C +++ b/model/fixed_fluid_density_fixed_droplet_radius_position_infer_drag_scenario.C @@ -52,7 +52,8 @@ namespace DIP const QUESO::BaseEnvironment & queso_env, const DropletData & data ) : FixedFluidDensityFixedDropletRadiusPositionScenarioBase(input,data), - _n_params(1+this->_data.n_data()) + //_n_params(1+this->_data.n_data()) + _n_params(2) //_n_marg_params(1) { // Setup parameter space, domain, and RV @@ -90,7 +91,7 @@ namespace DIP queso_assert_equal_to(model_output.sizeGlobal(), this->_data.n_data()); const double rho_d = this->_rho_d_nom*domain_vector[0]; - //const double _cd = this->_cd*domain_vector[0]; + const double cd = this->_cd*domain_vector[1]; for( unsigned int i = 0; i < this->_data.n_data(); i++ ) @@ -102,7 +103,7 @@ namespace DIP model_output[i] = this->_model.position(this->_rho_f, rho_d, r_d, - this->_cd, + cd, t); } } diff --git a/model/model_input.in b/model/model_input.in new file mode 100644 index 0000000..70b23ba --- /dev/null +++ b/model/model_input.in @@ -0,0 +1,28 @@ +# Input file for droplet inverse problem + +[Data] + conversion_datasets = './data/slomo_1471360151_mmPixel.csv' + position_datasets = './data/slomo_1471360151_rise.csv' + frame_rate = '60' + + # Number of pixels "fuzz" in a single position measurement (at the bubble boundary) + n_pixels_boundary = '10' +[] + +[Droplet] + fluid_density = '997' #Water, [kg/m^3] + + drag_coeff = '0.9' + drag_coeff_min = '0.8' #Normalized based on nominal radius determined by data + drag_coeff_max = '2.0' #Normalized based on nominal radius determined by data + + droplet_density = '961' #Published value of caster oil, [kg/m^3] + droplet_density_min = '0.8' + droplet_density_max = '1.2' +[] + +[InverseProblem] + scenario = 'fixed_rhof_fixed_rd_position_infer_cd' + solver_type = 'metropolis-hastings' + guess = '1.0 1.0' +[] diff --git a/model/src b/model/src new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/model/src @@ -0,0 +1 @@ + diff --git a/model/warnings b/model/warnings new file mode 100644 index 0000000..da3a749 --- /dev/null +++ b/model/warnings @@ -0,0 +1,21 @@ +WARNING In Algorithm::alpha(x,y), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0: y.logTarget() = -nan, x.values() = 1.01259 0.905306 , y.values() = 1.03972 0.800748 +WARNING In MetropolisHastingsSG::alpha(vec), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0, positionId = 740451, stageId = 1: inputSize = 2, inputPositionsData[inputSize - 1]->logTarget() = -nan, [0]->values() = 1.01295 0.898824 , [inputSize - 1]->values() = 1.03972 0.800748 +WARNING In MetropolisHastingsSG::alpha(vec), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0, positionId = 740451, stageId = 1: inputSize = 2, inputPositionsData[inputSize - 1]->logTarget() = -nan, [0]->values() = 1.01259 0.905306 , [inputSize - 1]->values() = 1.03972 0.800748 +WARNING In Algorithm::alpha(x,y), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0: y.logTarget() = -nan, x.values() = 1.01147 0.926868 , y.values() = 1.03761 0.801581 +WARNING In MetropolisHastingsSG::alpha(vec), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0, positionId = 741230, stageId = 1: inputSize = 2, inputPositionsData[inputSize - 1]->logTarget() = -nan, [0]->values() = 1.01434 0.884699 , [inputSize - 1]->values() = 1.03761 0.801581 +WARNING In MetropolisHastingsSG::alpha(vec), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0, positionId = 741230, stageId = 1: inputSize = 2, inputPositionsData[inputSize - 1]->logTarget() = -nan, [0]->values() = 1.01147 0.926868 , [inputSize - 1]->values() = 1.03761 0.801581 +WARNING In Algorithm::alpha(x,y), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0: y.logTarget() = -nan, x.values() = 1.00747 1.06607 , y.values() = 1.03871 0.801129 +WARNING In MetropolisHastingsSG::alpha(vec), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0, positionId = 742854, stageId = 1: inputSize = 2, inputPositionsData[inputSize - 1]->logTarget() = -nan, [0]->values() = 1.01126 0.945578 , [inputSize - 1]->values() = 1.03871 0.801129 +WARNING In MetropolisHastingsSG::alpha(vec), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0, positionId = 742854, stageId = 1: inputSize = 2, inputPositionsData[inputSize - 1]->logTarget() = -nan, [0]->values() = 1.00747 1.06607 , [inputSize - 1]->values() = 1.03871 0.801129 +WARNING In Algorithm::alpha(x,y), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0: y.logTarget() = -nan, x.values() = 1.00125 1.30614 , y.values() = 1.03764 0.802089 +WARNING In MetropolisHastingsSG::alpha(vec), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0, positionId = 743001, stageId = 1: inputSize = 2, inputPositionsData[inputSize - 1]->logTarget() = -nan, [0]->values() = 0.999488 1.44239 , [inputSize - 1]->values() = 1.03764 0.802089 +WARNING In MetropolisHastingsSG::alpha(vec), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0, positionId = 743001, stageId = 1: inputSize = 2, inputPositionsData[inputSize - 1]->logTarget() = -nan, [0]->values() = 1.00125 1.30614 , [inputSize - 1]->values() = 1.03764 0.802089 +WARNING In Algorithm::alpha(x,y), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0: y.logTarget() = -nan, x.values() = 1.01384 0.820688 , y.values() = 1.04628 0.800015 +WARNING In MetropolisHastingsSG::alpha(vec), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0, positionId = 745458, stageId = 1: inputSize = 2, inputPositionsData[inputSize - 1]->logTarget() = -nan, [0]->values() = 1.0163 0.809217 , [inputSize - 1]->values() = 1.04628 0.800015 +WARNING In MetropolisHastingsSG::alpha(vec), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0, positionId = 745458, stageId = 1: inputSize = 2, inputPositionsData[inputSize - 1]->logTarget() = -nan, [0]->values() = 1.01384 0.820688 , [inputSize - 1]->values() = 1.04628 0.800015 +WARNING In Algorithm::alpha(x,y), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0: y.logTarget() = -nan, x.values() = 1.01325 0.850944 , y.values() = 1.04717 0.800092 +WARNING In MetropolisHastingsSG::alpha(vec), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0, positionId = 745484, stageId = 1: inputSize = 2, inputPositionsData[inputSize - 1]->logTarget() = -nan, [0]->values() = 1.01224 0.846561 , [inputSize - 1]->values() = 1.04717 0.800092 +WARNING In MetropolisHastingsSG::alpha(vec), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0, positionId = 745484, stageId = 1: inputSize = 2, inputPositionsData[inputSize - 1]->logTarget() = -nan, [0]->values() = 1.01325 0.850944 , [inputSize - 1]->values() = 1.04717 0.800092 +WARNING In Algorithm::alpha(x,y), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0: y.logTarget() = -nan, x.values() = 1.00906 1.0143 , y.values() = 1.04379 0.800475 +WARNING In MetropolisHastingsSG::alpha(vec), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0, positionId = 746404, stageId = 1: inputSize = 2, inputPositionsData[inputSize - 1]->logTarget() = -nan, [0]->values() = 1.00747 1.07847 , [inputSize - 1]->values() = 1.04379 0.800475 +WARNING In MetropolisHastingsSG::alpha(vec), worldRank 0, fullRank 0, subEnvironment 0, subRank 0, inter0Rank 0, positionId = 746404, stageId = 1: inputSize = 2, inputPositionsData[inputSize - 1]->logTarget() = -nan, [0]->values() = 1.00906 1.0143 , [inputSize - 1]->values() = 1.04379 0.800475