nonzero m and d coefficients for Matlab PDE
Show older comments
Hello, everyone!
I am trying to solve the 2D problem with Matlab PDE and need to specify both mass (m) and damping (d) to be nonzero.
Workflow in short:
create model with
model = createpde(N);
specify geometry ...
coefficients:
specifyCoefficients(model, 'm', rho, 'd', d, 'c', c, 'a', 0, 'f', f);
and solve it:
result = solvepde(model,time);
I got stuck having the error:
Error using pde.CoefficientAssignment/checkMandD (line 303)
When both 'm' and 'd' coefficients are nonzeros, the 'd' coefficient must be a matrix.
In the documentation to the function "specifyCoefficients" it is said:
Note: If the PDE to solve has both 'm' and 'd' coefficients that are
non-zero, then 'd' must be a matrix that has the same size as
the discretized mass matrix (not to be confused with 'm').
What is the correct way to specify 'd' coefficient when mass is nonzero?
Accepted Answer
More Answers (0)
Categories
Find more on Eigenvalue Problems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!