Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Error in Thermoviscous Acoustics: Undefined variable. - Variable: comp1.mat1.def.pA

Please login with a confirmed email address before reporting spam

Hello,

I am trying to calculate the input impedance of an open tube, so that the viscous and thermal losses due to the boundary layer are included, using the Thermoviscous Acoustics module. The input to the system is a normal velocity at one end of the tube and the other end should be modelled as a radiation impedance. In the Acoustics Module there is a boundary condition for a radiation impedance, which I could not find in the Thermoviscous Acoustics module. So, I tried to define the radiation condition using an analytical model, by including the following formula for the Normal Impedance condition: mat1.def.rho*mat1.def.c*((beta*radius)^2/4+i*0.61*beta*radius), where beta is defined as a variable and radius as a parameter. However, when I try to compute the system I a get the following error:

  • Feature: Stationary Solver 1 (sol1/s1) Undefined variable.
    • Variable: comp1.mat1.def.pA
    • Geometry: geom1
    • Boundary: 3 Failed to evaluate variable.
    • Variable: comp1.mat1.def.rho
    • Defined as: (comp1.mat1.def.rho(comp1.mat1.def.pA/unit_Pa_cf,comp1.T/unit_K_cf)*unit _kg_cf)/(unit_m_cf^3) Failed to evaluate variable.
    • Variable: comp1.ta.ni1.Z0
    • Defined as: ((comp1.mat1.def.rho*comp1.mat1.def.c)*((0.25*((comp1.beta*radius)^2))+(radius*(comp1.beta*(0.61*i)))))*exp(i*phase) Failed to evaluate expression.
    • Expression: dvol_spatial*(r*(pi*(comp1.ta.delta*((((-2)*comp1.ta.ni1.Z0)*comp1.ta.Un)*comp1.ta.ni1.nz)))) Failed to evaluate Jacobian of expression.
    • Expression: (-2*comp1.ta.ni1.Z0*comp1.ta.Un*(comp1.ta.ni1.nr*test(comp1.u)+comp1.ta.ni1.nz*test(comp1.w))*comp1.ta.delta*pi*r)*(dvol_spatial)

I can see that rho is defined as a function of pA in the material I am using (air) but I don't know how to define it pA. I have attached my model file.

Kind Regards,
Angelis



2 Replies Last Post 12 dic 2018, 10:22 GMT-5
Elin Svensson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 12 dic 2018, 05:54 GMT-5
Updated: 6 years ago 12 dic 2018, 06:04 GMT-5

Hello Angelis,
In version 5.4 your model solves and the value of the temperature and the pressure can be defined under the Common Model Inputs node which is found under Global Definitions.

Another solution, that works also in earlier versions, is to use the domain variables from Thermoviscous Acoustics instead of using the material. For example, replace mat1.def.rho by ta.rho0. You can find their names by selecting the Equation View node for Thermoviscous Acoustics Model 1.

A better way of setting up your example would be to model a piece of air outside the pipe and then use a pml. If you have questions about how to do this, you can contact support.

Best regards,
Elin

Hello Angelis, In version 5.4 your model solves and the value of the temperature and the pressure can be defined under the Common Model Inputs node which is found under Global Definitions. Another solution, that works also in earlier versions, is to use the domain variables from Thermoviscous Acoustics instead of using the material. For example, replace mat1.def.rho by ta.rho0. You can find their names by selecting the Equation View node for Thermoviscous Acoustics Model 1. A better way of setting up your example would be to model a piece of air outside the pipe and then use a pml. If you have questions about how to do this, you can contact support. Best regards, Elin

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 12 dic 2018, 10:22 GMT-5

Hi Elin,

Thank you very much for your prompt reply! I managed to implement all the variables using the ones from Thermoviscous Acoustics, as you suggested, and the model works. I am using version 5.3, so I couldn't check also your first suggestion. Regarding the modelling of the open end with an extension and a PML, I am familiar with basic concepts behind it and will probably try it in the future.

Thanks again for your thorough reply, Angelis

Hi Elin, Thank you very much for your prompt reply! I managed to implement all the variables using the ones from Thermoviscous Acoustics, as you suggested, and the model works. I am using version 5.3, so I couldn't check also your first suggestion. Regarding the modelling of the open end with an extension and a PML, I am familiar with basic concepts behind it and will probably try it in the future. Thanks again for your thorough reply, Angelis

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.