43 #include <lifev/one_d_fsi/solver/OneDFSIData.hpp> 117 M_physicsType = OneDFSI::physicsMap[ dataFile ( ( section +
"/Model/PhysicsType" ).data(),
"OneD_1DLinearPhysics" ) ];
118 M_fluxType = OneDFSI::fluxMap[ dataFile ( ( section +
"/Model/FluxType" ).data(),
"OneD_1DLinearFlux" ) ];
119 M_sourceType = OneDFSI::sourceMap[ dataFile ( ( section +
"/Model/SourceType" ).data(),
"OneD_1DLinearSource" ) ];
122 if ( !M_timeDataPtr.get() )
124 M_timeDataPtr.reset (
new time_Type ( dataFile, (section +
"/time_discretization" ).data() ) );
128 Real length = dataFile ( ( section +
"/space_discretization/Length" ).data(), 1. );
129 Real numberOfElements = dataFile ( ( section +
"/space_discretization/NumberOfElements" ).data(), 10 );
131 regularMesh1D ( *M_meshPtr, 1, numberOfElements,
false, length, 0 );
137 M_viscoelasticWall = dataFile ( ( section +
"/PhysicalWall/ViscoelasticWall" ).data(),
false );
138 M_viscoelasticAngle = dataFile ( ( section +
"/PhysicalWall/ViscoelasticAngle" ).data(), 5. ) *
M_PI / 180.;
139 M_viscoelasticPeriod = dataFile ( ( section +
"/PhysicalWall/ViscoelasticPeriod" ).data(), 0.3 * 0.8 );
141 M_inertialWall = dataFile ( ( section +
"/PhysicalWall/InertialWall" ).data(),
false );
142 M_densityWall = dataFile ( ( section +
"/PhysicalWall/DensityWall" ).data(), 1. );
143 M_inertialModulus = dataFile ( ( section +
"/PhysicalWall/coeffA" ).data(), 0. );
145 M_longitudinalWall = dataFile ( ( section +
"/PhysicalWall/LongitudinalWall" ).data(),
false );
148 M_postprocessingDirectory = dataFile ( ( section +
"/miscellaneous/post_dir" ).data(),
"./" );
149 M_postprocessingFile = dataFile ( ( section +
"/miscellaneous/post_file" ).data(),
"sol" );
150 M_CFLmax = dataFile ( ( section +
"/miscellaneous/CFLmax" ).data(), std::sqrt (3.) / 3. );
152 if (
M_CFLmax > std::sqrt (3.) / 3. )
154 std::cout <<
"!!! WARNING: CFLmax greater than the theoretical value (see MOX21, eq. 1.47) - CONVERGENCE NOT GUARANTEED !!!" << std::endl;
158 M_jacobianPerturbationArea = dataFile ( ( section +
"/JacobianPerturbation/deltaArea" ).data(), 0.001 );
159 M_jacobianPerturbationFlowRate = dataFile ( ( section +
"/JacobianPerturbation/deltaFlowRate" ).data(), 0.001 );
160 M_jacobianPerturbationStress = dataFile ( ( section +
"/JacobianPerturbation/deltaStress" ).data(), 1.0 );
163 M_computeCoefficients = dataFile ( ( section +
"/PhysicalParameters/ComputeCoefficients" ).data(),
false );
164 M_powerLawCoefficient = dataFile ( ( section +
"/PhysicalParameters/PowerlawCoefficient" ).data(), 2 );
166 M_density = dataFile ( ( section +
"/PhysicalParameters/density" ).data(), 1. );
167 M_viscosity = dataFile ( ( section +
"/PhysicalParameters/viscosity" ).data(), 0.035 );
169 M_thickVessel = dataFile ( ( section +
"/PhysicalParameters/thickVessel" ).data(),
false );
170 M_young = dataFile ( ( section +
"/PhysicalParameters/young" ).data(), 4.0E6 );
171 M_poisson = dataFile ( ( section +
"/PhysicalParameters/poisson" ).data(), 0.5 );
173 M_externalPressure = dataFile ( ( section +
"/PhysicalParameters/externalPressure" ).data(), 0. );
174 M_venousPressure = dataFile ( ( section +
"/PhysicalParameters/venousPressure" ).data(), 0. );
175 M_friction = dataFile ( ( section +
"/PhysicalParameters/Kr" ).data(), 1. );
177 M_robertsonCorrection = dataFile ( ( section +
"/PhysicalParameters/RobertsonCorrection" ).data(), 1. );
179 M_computeCoefficients = dataFile ( ( section +
"/PhysicalParameters/ComputeCoefficients" ).data(),
false );
185 std::map< std::string, OneD_distributionLaw > distributionLawMap;
186 distributionLawMap[
"uniform"] = uniform;
187 distributionLawMap[
"linear"] = linear;
188 distributionLawMap[
"pointwise"] = pointwise;
190 OneD_distributionLaw distributionLaw = distributionLawMap[ dataFile ( ( section +
"/PhysicalParameters/DistributionLaw" ).data(),
"uniform" ) ];
191 switch ( distributionLaw )
195 for ( UInt i = 0; i < M_meshPtr->numPoints() ; ++i )
198 M_thickness[i] = dataFile ( ( section +
"/PhysicalParameters/thickness" ).data(), 0. );
199 M_viscoelasticCoefficient[i] = dataFile ( ( section +
"/PhysicalWall/ViscoelasticCoefficient" ).data(), 0. );
201 M_area0[i] = dataFile ( ( section +
"/PhysicalParameters/Area0" ).data(),
M_PI );
202 M_alpha[i] = dataFile ( ( section +
"/PhysicalParameters/AlphaCoriolis" ).data(), 1. / M_robertsonCorrection );
203 M_beta0[i] = dataFile ( ( section +
"/PhysicalParameters/Beta0" ).data(), 1.e6 );
204 M_beta1[i] = dataFile ( ( section +
"/PhysicalParameters/Beta1" ).data(), 0.5 );
207 M_flux11[i] = dataFile ( ( section +
"/LinearParameters/Flux11" ).data(), 1. );
208 M_flux12[i] = dataFile ( ( section +
"/LinearParameters/Flux12" ).data(), 0. );
209 M_flux21[i] = dataFile ( ( section +
"/LinearParameters/Flux21" ).data(), 0. );
210 M_flux22[i] = dataFile ( ( section +
"/LinearParameters/Flux22" ).data(), 1. );
211 M_celerity1[i] = dataFile ( ( section +
"/LinearParameters/Celerity1" ).data(), 1. );
212 M_celerity2[i] = dataFile ( ( section +
"/LinearParameters/Celerity2" ).data(), 1. );
213 M_celerity1LeftEigenvector1[i] = dataFile ( ( section +
"/LinearParameters/LeftEigenvector11" ).data(), 1. );
214 M_celerity1LeftEigenvector2[i] = dataFile ( ( section +
"/LinearParameters/LeftEigenvector12" ).data(), 0. );
215 M_celerity2LeftEigenvector1[i] = dataFile ( ( section +
"/LinearParameters/LeftEigenvector21" ).data(), 0. );
216 M_celerity2LeftEigenvector2[i] = dataFile ( ( section +
"/LinearParameters/LeftEigenvector22" ).data(), 1. );
217 M_source10[i] = dataFile ( ( section +
"/LinearParameters/Source10" ).data(), 0. );
218 M_source20[i] = dataFile ( ( section +
"/LinearParameters/Source20" ).data(), 0. );
219 M_source11[i] = dataFile ( ( section +
"/LinearParameters/Source11" ).data(), 0. );
220 M_source12[i] = dataFile ( ( section +
"/LinearParameters/Source12" ).data(), 0. );
221 M_source21[i] = dataFile ( ( section +
"/LinearParameters/Source21" ).data(), 0. );
222 M_source22[i] = dataFile ( ( section +
"/LinearParameters/Source22" ).data(), 0. );
229 linearInterpolation ( M_thickness, dataFile, section +
"/PhysicalParameters/thickness", 0. );
230 linearInterpolation ( M_viscoelasticCoefficient, dataFile, section +
"/PhysicalWall/ViscoelasticCoefficient", 0. );
232 linearInterpolation ( M_area0, dataFile, section +
"/PhysicalParameters/Area0",
M_PI );
233 linearInterpolation ( M_alpha, dataFile, section +
"/PhysicalParameters/AlphaCoriolis", 1. / M_robertsonCorrection,
true );
234 linearInterpolation ( M_beta0, dataFile, section +
"/PhysicalParameters/Beta0", 1.e6 );
235 linearInterpolation ( M_beta1, dataFile, section +
"/PhysicalParameters/Beta1", 0.5 );
237 linearInterpolation ( M_flux11, dataFile, section +
"/PhysicalParameters/Flux11", 1. );
238 linearInterpolation ( M_flux12, dataFile, section +
"/PhysicalParameters/Flux12", 0. );
239 linearInterpolation ( M_flux21, dataFile, section +
"/PhysicalParameters/Flux21", 0. );
240 linearInterpolation ( M_flux22, dataFile, section +
"/PhysicalParameters/Flux22", 1. );
241 linearInterpolation ( M_celerity1, dataFile, section +
"/PhysicalParameters/Celerity1", 1. );
242 linearInterpolation ( M_celerity2, dataFile, section +
"/PhysicalParameters/Celerity2", 1. );
243 linearInterpolation ( M_celerity1LeftEigenvector1, dataFile, section +
"/PhysicalParameters/LeftEigenvector11", 1. );
244 linearInterpolation ( M_celerity1LeftEigenvector2, dataFile, section +
"/PhysicalParameters/LeftEigenvector12", 0. );
245 linearInterpolation ( M_celerity2LeftEigenvector1, dataFile, section +
"/PhysicalParameters/LeftEigenvector21", 0. );
246 linearInterpolation ( M_celerity2LeftEigenvector2, dataFile, section +
"/PhysicalParameters/LeftEigenvector22", 1. );
247 linearInterpolation ( M_source10, dataFile, section +
"/PhysicalParameters/Source10", 0. );
248 linearInterpolation ( M_source20, dataFile, section +
"/PhysicalParameters/Source20", 0. );
249 linearInterpolation ( M_source11, dataFile, section +
"/PhysicalParameters/Source11", 0. );
250 linearInterpolation ( M_source12, dataFile, section +
"/PhysicalParameters/Source12", 0. );
251 linearInterpolation ( M_source21, dataFile, section +
"/PhysicalParameters/Source21", 0. );
252 linearInterpolation ( M_source22, dataFile, section +
"/PhysicalParameters/Source22", 0. );
258 for ( UInt i = 0; i < M_meshPtr->numPoints() ; ++i )
261 M_thickness[i] = dataFile ( ( section +
"/PhysicalParameters/thickness" ).data(), 0., i );
262 M_viscoelasticCoefficient[i] = dataFile ( ( section +
"/PhysicalWall/ViscoelasticCoefficient" ).data(), 0., i );
264 M_area0[i] = dataFile ( ( section +
"/PhysicalParameters/Area0" ).data(),
M_PI, i );
265 M_alpha[i] = dataFile ( ( section +
"/PhysicalParameters/AlphaCoriolis" ).data(), 1. / M_robertsonCorrection, i );
266 M_beta0[i] = dataFile ( ( section +
"/PhysicalParameters/Beta0" ).data(), 1.e6, i );
267 M_beta1[i] = dataFile ( ( section +
"/PhysicalParameters/Beta1" ).data(), 0.5, i );
270 M_flux11[i] = dataFile ( ( section +
"/LinearParameters/Flux11" ).data(), 1., i );
271 M_flux12[i] = dataFile ( ( section +
"/LinearParameters/Flux12" ).data(), 0., i );
272 M_flux21[i] = dataFile ( ( section +
"/LinearParameters/Flux21" ).data(), 0., i );
273 M_flux22[i] = dataFile ( ( section +
"/LinearParameters/Flux22" ).data(), 1., i );
274 M_celerity1[i] = dataFile ( ( section +
"/LinearParameters/Celerity1" ).data(), 1., i );
275 M_celerity2[i] = dataFile ( ( section +
"/LinearParameters/Celerity2" ).data(), 1., i );
276 M_celerity1LeftEigenvector1[i] = dataFile ( ( section +
"/LinearParameters/LeftEigenvector11" ).data(), 1., i );
277 M_celerity1LeftEigenvector2[i] = dataFile ( ( section +
"/LinearParameters/LeftEigenvector12" ).data(), 0., i );
278 M_celerity2LeftEigenvector1[i] = dataFile ( ( section +
"/LinearParameters/LeftEigenvector21" ).data(), 0., i );
279 M_celerity2LeftEigenvector2[i] = dataFile ( ( section +
"/LinearParameters/LeftEigenvector22" ).data(), 1., i );
280 M_source10[i] = dataFile ( ( section +
"/LinearParameters/Source10" ).data(), 0., i );
281 M_source20[i] = dataFile ( ( section +
"/LinearParameters/Source20" ).data(), 0., i );
282 M_source11[i] = dataFile ( ( section +
"/LinearParameters/Source11" ).data(), 0., i );
283 M_source12[i] = dataFile ( ( section +
"/LinearParameters/Source12" ).data(), 0., i );
284 M_source21[i] = dataFile ( ( section +
"/LinearParameters/Source21" ).data(), 0., i );
285 M_source22[i] = dataFile ( ( section +
"/LinearParameters/Source22" ).data(), 0., i );
292 std::cout <<
"Warning: distributionLaw \"" << distributionLaw <<
"\"not available!" << std::endl;
301 OneDFSIData::oldStyleSetup (
const GetPot& dataFile,
const std::string& section )
303 std::cerr << std::endl <<
"Warning: OneDFSIData::oldStyleSetup( ... ) is deprecated!" << std::endl
304 <<
" You should use OneDFSIData::setup( ... ) instead!" << std::endl;
307 M_physicsType = OneDFSI::physicsMap[ dataFile ( ( section +
"/Model/PhysicsType" ).data(),
"OneD_1DLinearPhysics" ) ];
308 M_fluxType = OneDFSI::fluxMap[ dataFile ( ( section +
"/Model/FluxType" ).data(),
"OneD_1DLinearFlux" ) ];
309 M_sourceType = OneDFSI::sourceMap[ dataFile ( ( section +
"/Model/SourceType" ).data(),
"OneD_1DLinearSource" ) ];
312 if ( !M_timeDataPtr.get() )
314 M_timeDataPtr.reset (
new time_Type ( dataFile, (section +
"/time_discretization" ).data() ) );
318 Real length = dataFile ( ( section +
"/discretization/x_right" ).data(), 1. ) -
319 dataFile ( ( section +
"/discretization/x_left" ).data(), 0. );
321 Real numberOfElements = dataFile ( ( section +
"/discretization/nb_elem" ).data(), 10 );
322 regularMesh1D ( *M_meshPtr, 1, numberOfElements,
false, length, 0 );
328 M_inertialWall = dataFile ( ( section +
"/miscellaneous/inertial_wall" ).data(),
false );
329 M_viscoelasticWall = dataFile ( ( section +
"/miscellaneous/viscoelastic_wall" ).data(),
false );
330 M_longitudinalWall = dataFile ( ( section +
"/miscellaneous/longitudinal_wall" ).data(),
false );
333 M_postprocessingDirectory = dataFile ( ( section +
"/miscellaneous/post_dir" ).data(),
"./" );
334 M_postprocessingFile = dataFile ( ( section +
"/miscellaneous/post_file" ).data(),
"sol" );
335 M_inertialWall = dataFile ( ( section +
"/miscellaneous/inertial_wall" ).data(),
false );
336 M_viscoelasticWall = dataFile ( ( section +
"/miscellaneous/viscoelastic_wall" ).data(),
false );
337 M_CFLmax = dataFile ( ( section +
"/miscellaneous/CFLmax" ).data(), std::sqrt (3.) / 3. );
339 if (
M_CFLmax > std::sqrt (3.) / 3. )
341 std::cout <<
"!!! WARNING: CFLmax greater than the theoretical value (see MOX21, eq. 1.47) - CONVERGENCE NOT GUARANTEED !!!" << std::endl;
345 M_jacobianPerturbationArea = dataFile ( ( section +
"JacobianPerturbation/deltaArea" ).data(), 0.001 );
346 M_jacobianPerturbationFlowRate = dataFile ( ( section +
"JacobianPerturbation/deltaFlowRate" ).data(), 0.001 );
347 M_jacobianPerturbationStress = dataFile ( ( section +
"JacobianPerturbation/deltaStress" ).data(), 1.0 );
350 M_computeCoefficients = dataFile ( ( section +
"/parameters/use_physical_values" ).data(),
false );
351 M_powerLawCoefficient = dataFile ( ( section +
"/PhysicalParameters/PowerlawCoefficient" ).data(), 2 );
353 M_density = dataFile ( ( section +
"/1d_physics/density" ).data(), 1. );
354 M_viscosity = dataFile ( ( section +
"/1d_physics/viscosity" ).data(), 0.035 );
356 M_densityWall = dataFile ( ( section +
"/PhysicalParameters/densityWall" ).data(), 1. );
357 M_thickVessel = dataFile ( ( section +
"/PhysicalParameters/thickVessel" ).data(),
false );
358 M_young = dataFile ( ( section +
"/1d_physics/young" ).data(), 4.0E6 );
359 M_poisson = dataFile ( ( section +
"/1d_physics/ksi" ).data(), 0.5 );
361 M_externalPressure = dataFile ( ( section +
"/PhysicalParameters/externalPressure" ).data(), 0. );
362 M_venousPressure = dataFile ( ( section +
"/PhysicalParameters/venousPressure" ).data(), 0. );
364 M_inertialModulus = dataFile ( ( section +
"/PhysicalParameters/coeffA" ).data(), 0. );
365 M_robertsonCorrection = dataFile ( ( section +
"/PhysicalParameters/RobertsonCorrection" ).data(), 1. );
367 M_friction = dataFile ( ( section +
"/parameters/Kr" ).data(), 1. );
368 M_computeCoefficients = dataFile ( ( section +
"/parameters/use_physical_values" ).data(),
false );
374 for ( UInt i = 0; i < M_meshPtr->numPoints() ; ++i )
376 M_viscoelasticCoefficient[i] = dataFile ( ( section +
"/PhysicalParameters/gamma" ).data(), 0. );
379 if ( M_computeCoefficients )
381 M_area0[i] = OneDFSI::pow20 ( dataFile ( ( section +
"/1d_physics/radius" ).data(), 0.5 ), 2 ) *
M_PI;
385 M_area0[i] = dataFile ( ( section +
"/parameters/Area0" ).data(),
M_PI );
387 M_beta0[i] = dataFile ( ( section +
"/parameters/beta0" ).data(), 1.e6 );
388 M_beta1[i] = dataFile ( ( section +
"/parameters/beta1" ).data(), 0.5 );
389 M_thickness[i] = dataFile ( ( section +
"/1d_physics/thickness" ).data(), 0. );
391 M_alpha[i] = dataFile ( ( section +
"/parameters/alphaCor" ).data(), 1. / M_robertsonCorrection );
394 M_flux11[i] = dataFile ( ( section +
"/LinearParameters/Flux11" ).data(), 1. );
395 M_flux12[i] = dataFile ( ( section +
"/LinearParameters/Flux12" ).data(), 0. );
396 M_flux21[i] = dataFile ( ( section +
"/LinearParameters/Flux21" ).data(), 0. );
397 M_flux22[i] = dataFile ( ( section +
"/LinearParameters/Flux22" ).data(), 1. );
398 M_celerity1[i] = dataFile ( ( section +
"/LinearParameters/Celerity1" ).data(), 1. );
399 M_celerity2[i] = dataFile ( ( section +
"/LinearParameters/Celerity2" ).data(), 1. );
400 M_celerity1LeftEigenvector1[i] = dataFile ( ( section +
"/LinearParameters/LeftEigenvector11" ).data(), 1. );
401 M_celerity1LeftEigenvector2[i] = dataFile ( ( section +
"/LinearParameters/LeftEigenvector12" ).data(), 0. );
402 M_celerity2LeftEigenvector1[i] = dataFile ( ( section +
"/LinearParameters/LeftEigenvector21" ).data(), 0. );
403 M_celerity2LeftEigenvector2[i] = dataFile ( ( section +
"/LinearParameters/LeftEigenvector22" ).data(), 1. );
404 M_source10[i] = dataFile ( ( section +
"/LinearParameters/Source10" ).data(), 0. );
405 M_source20[i] = dataFile ( ( section +
"/LinearParameters/Source20" ).data(), 0. );
406 M_source11[i] = dataFile ( ( section +
"/LinearParameters/Source11" ).data(), 0. );
407 M_source12[i] = dataFile ( ( section +
"/LinearParameters/Source12" ).data(), 0. );
408 M_source21[i] = dataFile ( ( section +
"/LinearParameters/Source21" ).data(), 0. );
409 M_source22[i] = dataFile ( ( section +
"/LinearParameters/Source22" ).data(), 0. );
424 ( radius * radius / 2 +
432 for ( UInt i = 0; i < M_meshPtr->numPoints(); ++i )
435 M_alpha[i] = 2 / ( radius * radius ) * profileIntegral;
440 M_beta0[i] = - M_thickness[i] * M_young * std::sqrt (
M_PI) / ( std::sqrt ( M_area0[i] ) * ( (1 - M_poisson * M_poisson )
441 + M_poisson * ( 1 + M_poisson ) * ( M_thickness[i] * std::sqrt (
M_PI) / std::sqrt ( M_area0[i] ) ) ) );
446 M_beta0[i] = M_thickness[i] * std::sqrt (
M_PI / M_area0[i] ) * M_young / (1 - M_poisson * M_poisson);
451 M_viscoelasticCoefficient[i] = M_thickness[i] * M_young / (1 - M_poisson * M_poisson) * M_viscoelasticPeriod *
452 std::tan ( M_viscoelasticAngle ) / ( 4 * std::sqrt (
M_PI) );
696 output <<
"\n*** Values for data [Model]" << std::endl << std::endl;
697 output <<
"Physics Type = " << enum2String ( M_physicsType, OneDFSI::physicsMap ) << std::endl;
698 output <<
"Flux Type = " << enum2String ( M_fluxType, OneDFSI::fluxMap ) << std::endl;
699 output <<
"Source Type = " << enum2String ( M_sourceType, OneDFSI::sourceMap ) << std::endl;
702 output <<
"\n*** Values for data [time_discretization]" << std::endl << std::endl;
703 M_timeDataPtr->showMe ( output );
706 output <<
"\n*** Values for data [space_discretization]" << std::endl << std::endl;
707 output <<
"Length = " << length() << std::endl;
708 output <<
"NumberOfElements = " << M_meshPtr->numElements() << std::endl;
711 output <<
"\n*** Values for data [PhysicalWallModel]" << std::endl << std::endl;
712 output <<
"Viscoelastic wall = " << M_viscoelasticWall << std::endl;
713 output <<
"Viscoelastic angle = " << M_viscoelasticAngle << std::endl;
714 output <<
"Viscoelastic period = " << M_viscoelasticPeriod << std::endl;
715 output <<
"Viscoelastic coeff. = " << M_viscoelasticCoefficient << std::endl;
716 output <<
"Inertial wall = " << M_inertialWall << std::endl;
717 output <<
"Wall density = " << M_densityWall << std::endl;
718 output <<
"Inertial modulus = " << M_inertialModulus << std::endl;
719 output <<
"Longitudinal wall = " << M_longitudinalWall << std::endl;
722 output <<
"\n*** Values for data [miscellaneous]" << std::endl << std::endl;
723 output <<
"Postprocessing Dir. = " << M_postprocessingDirectory << std::endl;
724 output <<
"Postprocessing File = " << M_postprocessingFile << std::endl;
725 output <<
"Maximum admissible CFL = " << M_CFLmax << std::endl;
728 output <<
"Jacobian perturbation Area = " << M_jacobianPerturbationArea << std::endl;
729 output <<
"Jacobian perturbation Flow Rate = " << M_jacobianPerturbationFlowRate << std::endl;
730 output <<
"Jacobian perturbation Stress = " << M_jacobianPerturbationStress << std::endl;
733 output <<
"\n*** Values for data [PhysicalParameters]" << std::endl << std::endl;
734 output <<
"Compute Coefficients = " << M_computeCoefficients << std::endl;
735 output <<
"Powerlaw Coefficient = " << M_powerLawCoefficient << std::endl;
736 output <<
"Fluid density = " << M_density << std::endl;
737 output <<
"Fluid dyn. viscosity = " << M_viscosity << std::endl;
738 output <<
"Thick vessel = " << M_thickVessel << std::endl;
739 output <<
"Young modulus = " << M_young << std::endl;
740 output <<
"Poisson = " << M_poisson << std::endl;
741 output <<
"External pressure = " << M_externalPressure << std::endl;
742 output <<
"Venous pressure = " << M_venousPressure << std::endl;
743 output <<
"Robertson correction = " << M_robertsonCorrection << std::endl;
745 output <<
"Area0 = " << M_area0 << std::endl;
746 output <<
"dArea0dz = " << M_dArea0dz << std::endl;
747 output <<
"Beta0 = " << M_beta0 << std::endl;
748 output <<
"dBeta0dz = " << M_dBeta0dz << std::endl;
749 output <<
"Beta1 = " << M_beta1 << std::endl;
750 output <<
"dBeta1dz = " << M_dBeta1dz << std::endl;
752 output <<
"Alpha (Coriolis) = " << M_alpha << std::endl;
753 output <<
"dAlpha (Coriolis) = " << M_dAlphadz << std::endl;
755 output <<
"Thickness = " << M_thickness << std::endl;
756 output <<
"Friction = " << M_friction << std::endl;
759 output <<
"\n*** Values for data [LinearParameters]" << std::endl << std::endl;
760 output <<
"Flux11 = " << M_flux11 << std::endl;
761 output <<
"Flux12 = " << M_flux12 << std::endl;
762 output <<
"Flux21 = " << M_flux21 << std::endl;
763 output <<
"Flux22 = " << M_flux22 << std::endl;
764 output <<
"Celerity1 = " << M_celerity1 << std::endl;
765 output <<
"Celerity2 = " << M_celerity2 << std::endl;
766 output <<
"Eigenvector11 = " << M_celerity1LeftEigenvector1 << std::endl;
767 output <<
"Eigenvector12 = " << M_celerity1LeftEigenvector2 << std::endl;
768 output <<
"Eigenvector21 = " << M_celerity2LeftEigenvector1 << std::endl;
769 output <<
"Eigenvector22 = " << M_celerity2LeftEigenvector2 << std::endl;
770 output <<
"Source10 = " << M_source10 << std::endl;
771 output <<
"Source20 = " << M_source20 << std::endl;
772 output <<
"Source11 = " << M_source11 << std::endl;
773 output <<
"Source12 = " << M_source12 << std::endl;
774 output <<
"Source21 = " << M_source21 << std::endl;
775 output <<
"Source22 = " << M_source22 << std::endl;
786 std::cout <<
"!!! WARNING: Robertson corretion has not been checked in this version of the code !!!" << std::endl;
797 const std::string& quantity,
798 const Real& defaultValue,
801 Real a = dataFile ( quantity.data(), defaultValue, 0 );
802 Real b = dataFile ( quantity.data(), a, 1 );
804 Real xa = M_meshPtr->firstPoint().x();
805 Real xb = M_meshPtr->lastPoint().x();
807 for ( UInt i (0) ; i < M_meshPtr->numPoints() ; ++i )
810 vector[i] = std::sqrt (a /
M_PI) + ( std::sqrt (b /
M_PI) - std::sqrt (a /
M_PI) ) /
811 ( xb - xa ) * ( M_meshPtr->point ( i ).x() - xa );
812 vector[i] *= vector[i] *
M_PI;
816 vector[i] = a + (b - a) / ( xb - xa ) * ( M_meshPtr->point ( i ).x() - xa );
830 for ( UInt iNode ( 0 ) ; iNode < M_meshPtr->numPoints() ; ++iNode )
832 M_dArea0dz[iNode] = computeSpatialDerivativeAtNode ( M_area0, iNode );
833 M_dBeta0dz[iNode] = computeSpatialDerivativeAtNode ( M_beta0, iNode );
834 M_dBeta1dz[iNode] = computeSpatialDerivativeAtNode ( M_beta1, iNode );
835 M_dAlphadz[iNode] = computeSpatialDerivativeAtNode ( M_alpha, iNode );
842 M_viscoelasticCoefficient.resize ( M_meshPtr->numPoints() );
843 M_thickness.resize ( M_meshPtr->numPoints() );
845 M_area0.resize ( M_meshPtr->numPoints() );
846 M_beta0.resize ( M_meshPtr->numPoints() );
847 M_beta1.resize ( M_meshPtr->numPoints() );
848 M_alpha.resize ( M_meshPtr->numPoints() );
850 M_dArea0dz.resize ( M_meshPtr->numPoints() );
851 M_dBeta0dz.resize ( M_meshPtr->numPoints() );
852 M_dBeta1dz.resize ( M_meshPtr->numPoints() );
853 M_dAlphadz.resize ( M_meshPtr->numPoints() );
856 M_flux11.resize ( M_meshPtr->numPoints() );
857 M_flux12.resize ( M_meshPtr->numPoints() );
858 M_flux21.resize ( M_meshPtr->numPoints() );
859 M_flux22.resize ( M_meshPtr->numPoints() );
860 M_celerity1.resize ( M_meshPtr->numPoints() );
861 M_celerity2.resize ( M_meshPtr->numPoints() );
862 M_celerity1LeftEigenvector1.resize ( M_meshPtr->numPoints() );
863 M_celerity1LeftEigenvector2.resize ( M_meshPtr->numPoints() );
864 M_celerity2LeftEigenvector1.resize ( M_meshPtr->numPoints() );
865 M_celerity2LeftEigenvector2.resize ( M_meshPtr->numPoints() );
866 M_source10.resize ( M_meshPtr->numPoints() );
867 M_source20.resize ( M_meshPtr->numPoints() );
868 M_source11.resize ( M_meshPtr->numPoints() );
869 M_source12.resize ( M_meshPtr->numPoints() );
870 M_source21.resize ( M_meshPtr->numPoints() );
871 M_source22.resize ( M_meshPtr->numPoints() );
std::string M_postprocessingDirectory
Miscellaneous.
scalarVector_Type M_flux12
scalarVector_Type M_flux21
OneDFSIData()
Empty constructor.
scalarVector_Type M_celerity1LeftEigenvector2
scalarVector_Type M_dAlphadz
scalarVector_Type M_alpha
scalarVector_Type M_thickness
OneDFSIData - Class which read and holds all the data for the One Dimensional Model Solver...
scalarVector_Type M_dArea0dz
Derivatives of main coefficients.
scalarVector_Type M_celerity2LeftEigenvector2
scalarVector_Type M_flux11
Flux matrix.
scalarVector_Type M_source21
bool M_computeCoefficients
Physical Parameters.
Real M_robertsonCorrection
scalarVector_Type M_source12
Real M_viscoelasticPeriod
void updateCoefficients()
Update all the physical coefficients.
scalarVector_Type M_source20
Real M_jacobianPerturbationStress
void updateInverseJacobian(const UInt &iQuadPt)
void resetContainers()
Reset all the containers.
scalarVector_Type M_source11
OneDFSI::sourceTerm_Type M_sourceType
scalarVector_Type M_celerity1LeftEigenvector1
Eigenvector for first and second eigenvalue.
scalarVector_Type M_viscoelasticCoefficient
const Real & robertsonCorrection() const
Get the Robertson correction coefficient (Not tested: maybe wrong in the code)
scalarVector_Type M_area0
scalarVector_Type M_celerity2LeftEigenvector1
void showMe(std::ostream &output=std::cout) const
Initialize linear parameters (NOT WORKING)
std::string M_postprocessingFile
full directory name (including path)
scalarVector_Type M_beta0
scalarVector_Type M_beta1
void computeSpatialDerivatives()
Compute the derivatives of alpha, area0, beta0, and beta1 using centered differences.
ublas::vector< Real > scalarVector_Type
Int M_powerLawCoefficient
scalarVector_Type M_flux22
scalarVector_Type M_dBeta1dz
scalarVector_Type M_celerity1
Celerities of the linear problem (eigenvalues of the flux matrix)
double Real
Generic real data.
Real M_jacobianPerturbationArea
Jacobian perturbation.
scalarVector_Type M_source22
OneDFSI::physicsType_Type M_physicsType
Model.
timePtr_Type M_timeDataPtr
Data containers for time and mesh.
scalarVector_Type M_dBeta0dz
scalarVector_Type M_source10
Source matrix.
Real M_jacobianPerturbationFlowRate
OneDFSI::fluxTerm_Type M_fluxType
Real M_CFLmax
output file name
bool M_viscoelasticWall
Physical Wall Model.
scalarVector_Type M_celerity2