How can I apply transient response of a system as a boundary condition?

3 次查看(过去 30 天)
I have obtained a transient response of a cantilever beam by statically loading it and then releasing it.
width = 0.3;
height = 0.03;
depth = 0.01;
gm = multicuboid(width, height, depth)
gm =
DiscreteGeometry with properties: NumCells: 1 NumFaces: 6 NumEdges: 12 NumVertices: 8 Vertices: [8×3 double]
model = femodel(AnalysisType="structuralStatic", Geometry=gm);
% Applying load
model.FaceLoad(6) = faceLoad(SurfaceTraction=[0;0;-1000])
model =
1×1 femodel array Properties for analysis type: structuralStatic AnalysisType: "structuralStatic" Geometry: [1×1 fegeometry] MaterialProperties: [0×1 materialProperties] Boundary Conditions FaceBC: [0×6 faceBC] EdgeBC: [0×12 edgeBC] VertexBC: [0×8 vertexBC] Loads CellLoad: [0×1 cellLoad] FaceLoad: [1×6 faceLoad] EdgeLoad: [0×12 edgeLoad] VertexLoad: [0×8 vertexLoad] Other Parameters ReferenceTemperature: [] SolverOptions: [1×1 pde.PDESolverOptions] Show all properties
% Solving the model
Rstatic = solve(model)
Error using pde.internal.FESolverUtilities.checkIncompleteSetup (line 16)
Model does not have a mesh. Use generateMesh.

Error in femodel/setupSolverUtilities (line 418)
pde.internal.FESolverUtilities.checkIncompleteSetup(obj);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in femodel/solve (line 43)
self = setupSolverUtilities(self);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
model.AnalysisType = "structuralTransient"
% Re-initializing the edgeload to remove all previous edge load
model.FaceLoad = []
% Applying the static analysis result as initial condition
model.CellIC = cellIC(Displacement=Rstatic, Velocity=[0,0,0])
% Specifying the time upto which we will observe the oscillation
tlist = linspace(0, 36*TimePeriod, 360)
resT = solve(model, tlist)
Now I have created another model for acoustic analysis by substracting the beam from a sphere, where the inner boundary of this domain is the outer boundary of the beam and the outer boudary of this domain is perfectly matched layer. How do I apply the transient response of the beam as inner boundary condition?
Is there any way to formulate the wave equation, then using phased array toolbox to check the effect of the wave at different location?

回答(1 个)

Ruchika Parag
Ruchika Parag 2025-6-25
Hi @Shubhrashayak, if you’ve already run a transient structural simulation and have the response of your cantilever beam (resT), you can use that as a boundary condition in your acoustic model — the one where you’ve subtracted the beam from a sphere.
You can do the following:
  1. Extract motion from the beamFrom your structural simulation, extract the normal velocity or displacement at the outer surface of the beam. This will be used to drive the acoustic model at the inner boundary.
  2. Apply it to the acoustic modelUse this extracted response as a time-dependent Neumann boundary condition (e.g., specifying NormalVelocity) in your acoustic PDE model.
Suppose you've solved the structural model as follows:
resT = solve(structuralModel, tlist);
Then, in your acoustic model setup:
acousticModel = createpde("acoustic", "transient");
% (Assume you've set up the geometry and mesh here)
% Define the face ID of the inner boundary (beam surface)
innerFaceID = 6; % just as an example
% Extract normal velocity from structural result
normalVel = resT.Velocity.uz; % assuming dominant motion is in z-direction
% Define a function to apply velocity over time
fvFunc = @(location, state) ...
interp1(tlist, normalVel(:, desiredNodeIdx), state.time, 'linear', 0);
% Apply it as a Neumann boundary condition on the acoustic domain
applyBoundaryCondition(acousticModel, ...
"neumann", ...
"Face", innerFaceID, ...
"g", fvFunc);
Make sure that desiredNodeIdx refers to a valid boundary node on the structural mesh that corresponds to the acoustic interface.
Using Phased Array Toolbox
Once you solve the acoustic model and obtain pressure data over time, you can use the Phased Array System Toolbox to analyze how the waves propagate across space. This is useful for simulating microphones, beamforming, and estimating direction of arrival.
For example:
pressures = interpolateSolution(acousticResult, probeLocations, timeIndices);
You can then pass the pressures to phased array components like phased.ULA or phased.DelayAndSumBeamformer.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Audio Processing Algorithm Design 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by