/* Acoustic sound transmission in an axi-symmetric cavity with two mechanical interfaces, and obstacle. */ kappa=26e-3; // heat conductivity cp=1; // heat capacity (constant pressure) cv=0.72; // heat capacity (constant volume) gamma=cp/cv; // isotropic coeffient R=cp-cv; // gas constant rho=1.2; // density p0=100e3; // atmospheric pressure in Pa pin1Ex=1.0; pin2Ex=0.0; Group { bdPin1=Region[11]; bdPin2=Region[12]; bdAll=Region[{10,11,12,13}]; air=Region[20]; } Constraint { { Name p1Cstr; Case { { Region bdPin1; Value pin1Ex; } } } { Name p2Cstr; Case { { Region bdPin2; Value pin2Ex; } } } { Name pBdHomogenCstr; Case { { Region bdPin1; Value 0; } { Region bdPin2; Value 1; } } } } FunctionSpace { { Name Hgrad_p; Type Form0; BasisFunction { { Name pBase; NameOfCoef p; Function BF_Node; Support air; Entity NodesOf[All, Not {bdPin1,bdPin2}]; } { Name pBase1; NameOfCoef pPin1; Function BF_GroupOfNodes; Support air; Entity GroupsOfNodesOf[bdPin1]; } { Name pBase2; NameOfCoef pPin2; Function BF_GroupOfNodes; Support air; Entity GroupsOfNodesOf[bdPin2]; } { Name pFBase; NameOfCoef pF; Function BF_Node; Support air; Entity NodesOf[All]; } } GlobalQuantity { { Name p1; Type AliasOf; NameOfCoef pPin1; } { Name q1; Type AssociatedWith; NameOfCoef pPin1; } { Name p2; Type AliasOf; NameOfCoef pPin2; } { Name q2; Type AssociatedWith; NameOfCoef pPin2; } } Constraint { { NameOfCoef p1; EntityType GroupsOfNodesOf; NameOfConstraint p1Cstr; } { NameOfCoef p2; EntityType GroupsOfNodesOf; NameOfConstraint p2Cstr; } { NameOfCoef pF; EntityType NodesOf; NameOfConstraint pBdHomogenCstr; } } } } Jacobian { { Name jac; Case { { Region All; Jacobian VolAxi; } } } } Integration { { Name int; Case { { Type Gauss; Case { {GeoElement Line; NumberOfPoints 4;} {GeoElement Triangle; NumberOfPoints 6;} } } } } } Formulation { { Name form; Type FemEquation; Quantity { { Name p; Type Local; NameOfSpace Hgrad_p; } { Name p1; Type Global; NameOfSpace Hgrad_p[p1]; } { Name p2; Type Global; NameOfSpace Hgrad_p[p2]; } { Name q1; Type Global; NameOfSpace Hgrad_p[q1]; } { Name q2; Type Global; NameOfSpace Hgrad_p[q2]; } { Name pF; Type Local; NameOfSpace Hgrad_p; } } Equation { Galerkin { DtDtDof [rho/p0*Dof{p}, {p}]; In air; Jacobian jac; Integration int; } // Galerkin { DtDtDof [-rho/p0*Dof{pF}, {p}]; // In air; Jacobian jac; // Integration int; // } Galerkin { [ Dof{Grad p}, {Grad p}]; In air; Jacobian jac; Integration int; } GlobalTerm { [-Dof{q1}, {p1}]; In bdPin1; } GlobalTerm { [-Dof{q2}, {p2}]; In bdPin2; } } Equation { Galerkin { DtDof [ Dof{pF}, {pF} ]; In air; Jacobian jac; Integration int; } // // Galerkin { DtDof [ -(cp-cv)/cp*Dof{p}, {pF} ]; // In air; Jacobian jac; // Integration int; // } Galerkin { [ kappa/(cp*rho)*Dof{Grad pF}, {Grad pF} ]; In air; Jacobian jac; Integration int; } } } } Resolution { { Name res; System { { Name sys; NameOfFormulation form; Type Complex; Frequency 1; } } Operation { Generate[sys]; Solve[sys]; SaveSolution[sys]; } } } PostProcessing { { Name postPro; NameOfFormulation form; Quantity { { Name p; Value { Local { [{p}]; In air; Jacobian jac; } } } } Quantity { { Name p; Value { Local { [{pF}]; In air; Jacobian jac; } } } } } } PostOperation { { Name postOp; NameOfPostProcessing postPro; Operation { Print[ p, OnElementsOf air, File "acoustics-transmissionPars.res"]; } } }