72 void load(
int argc,
char * argv[]);
84 rho(7800,
"rho",
"density"),
85 tubeL(.2,
"tube_length",
"pipe length" "m"),
86 tubeDEx(0.021,
"tube_diameter_external",
"external pipe diameter" "m"),
88 tubeDIn(0.0107,
"tube_diameter_internal",
"internal pipe diameter" "m"),
89 hole1Pos(0.1,
"hole_1_position",
"position of first hole" "m"),
90 hole2Pos(0.15,
"hole_2_position",
"position of second hole" "m"),
91 hole1D(15e-3,
"hole_1_diameter",
"diameter of first hole" "m"),
92 hole2D(15e-3,
"hole_2_diameter",
"diameter of second hole" "m"),
93 tSimulation(8e-5,
"simulation_time",
"simulation time"),
94 tOutput(1e-6,
"output_interval",
"output interval")
111 cout << vs <<
"; " <<
dx.
v() <<
"; " <<
dt.
v() << endl;
120 void Parameters::init()
136 double wallTh((params.
tubeDEx.
v())*.5);
139 h1Orientation*wallMid);
142 h2Orientation*wallMid);
146 pipeGeometry = pipeGeometry &
148 pipeGeometry = pipeGeometry &
155 float a(it<200. ? 1.-
cos(it*6.28/200.) : 0);
160 int main(
int argc,
char* argv[])
163 params.
load(argc, argv);
165 std::cout <<
"Data initialization... " <<
flush;
168 auto displacement(asl::generateDataContainerACL_SP<FlT>(block, 3, 1u));
171 auto mapMem(asl::generateDataContainerACL_SP<FlT>(block, 1, 1u));
177 writer.addVector(
"displacement", *displacement);
180 std::cout <<
"Finished" << endl;
182 std::cout <<
"Numerics initialization... " <<
flush;
198 std::vector<asl::SPNumMethod> bc;
209 std::cout <<
"Finished" << endl;
210 std::cout <<
"Computing..." << endl;
217 cout << params.
dt.
v() << endl;
220 elasticity->execute();
223 if(t - params.
tOutput.
v()>=tOutPrev)
227 cout << t <<
"/" << params.
tSimulation.
v() <<
"; expected left time: " <<
236 std::cout <<
"Finished" << endl;
238 cout <<
"time=" << timer.
getTime() <<
"; clockTime=" 242 std::cout <<
"Output...";
243 std::cout <<
"Finished" << endl;
244 std::cout <<
"Ok" << endl;
const double getTime() const
const double getProcessorLoad() const
asl::Parameter< double > shearModulus
asl::Parameter< double > hole2Pos
asl::ApplicationParametersManager appParamsManager
asl::Parameter< double > bulkModulus
asl::Parameter< double > tubeDEx
const double getClockTime() const
SPDistanceFunction normalize(SPDistanceFunction a, double dx)
SPNumMethod generateBCZeroStress(SPElasticityCommonA nm, SPAbstractDataWithGhostNodes map)
Bondary condition set given values to displacement/velocity.
asl::Parameter< double > tubeL
void initAll(std::vector< T * > &v)
SPDistanceFunction generateDFCylinderInf(double r, const AVec< double > &l, const AVec< double > &c)
generates infinite cylinder
asl::Parameter< double > hole2D
asl::Parameter< double > tubeDIn
asl::AVec< float > getAmplitude(double it)
asl::UValue< double > shearMNum
asl::Parameter< double > tSimulation
asl::Parameter< double > rho
asl::Parameter< double > tOutput
void load(int argc, char *argv[])
void initData(SPAbstractData d, double a)
asl::UValue< double > bulkMNum
const double getLeftTime(double fractTime)
void executeAll(std::vector< T * > &v)
void addScalars(std::string name, AbstractData &data)
asl::Parameter< double > hole1Pos
asl::Parameter< double > hole1D
SPFDElasticityRelaxation generateFDElasticityRelax(SPDataWithGhostNodesACLData d, double bM, double sM, double dt, const VectorTemplate *vT)
const VectorTemplate & d3q19()
Vector template.
asl::Parameter< double > dx
VectorOfElements generateVEConstant(T a)
Generates VectorOfElements with 1 Element acl::Constant with value a.
SPBCond generateBCConstantValue(SPAbstractDataWithGhostNodes d, double v, const std::vector< SlicesNames > &sl)
Bondary condition that puts fixed value in each point.
int main(int argc, char *argv[])
SPDistanceFunction generateDFCylinder(double r, const AVec< double > &l, const AVec< double > &c)
generates cylinder
void load(int argc, char *argv[])
asl::SPDistanceFunction generatePipe(asl::Block &block, Parameters ¶ms)