MATLAB Answers

How can I resolve the error "PDE coefficients cannot be function of solution or time." in a static solution of a PDE.

1 view (last 30 days)
Puneet Kumar
Puneet Kumar on 21 Jun 2019
Commented: Puneet Kumar on 23 Jun 2019
I am trying to solve a general PDE system with size 2. I have 2 set of dispalcement data at boundaries (shown as Disdata in code ) of model, which have been interpolated using interp1 function. The displacement function obtained from interpolation is employed as a boundary condition function to the model. While I am solvoing this problem using command
FEM = assembleFEMatrices(model,'nullspace') ;
I am getting a error "PDE coefficients cannot be function of solution or time" for 1 set data of dispacement but I am getting results for 2 set of data.
As I am solving a static linear problemsolving , why am I getting this error?
This a one portion of my code.
% specify PDE cofficient
'c',[C11, 0 , 0 ,G,0 ,C12,G,0 ,0 ,G,C12,0 ,G,0 ,0 ,C11]',...
'a',[0; 0; 0; 0 ],'f',[ 0; 0 ]);
% Call displcement interpolation function
[UVdispB, UVdispT, UVdispL, UVdispR]=InterpolateDisplacement(Disdata);
%Apply a displcement on respective boundary Edges in x and y-directions
% Generate Mesh and Solve
%Plot the mesh.
figure (7)
%Assemble finite element matrices
FEM = assembleFEMatrices(model,'nullspace') ;


Sign in to comment.

Answers (1)

Ravi Kumar
Ravi Kumar on 21 Jun 2019
What are the output arguments in you function call InterpolateDisplacement?
[UVdispB, UVdispT, UVdispL, UVdispR]=InterpolateDisplacement(Disdata);
Since you input them as applyBoundaryCondition(model,'dirichlet','Edge',EdgeB,'u',@UVdispB,'Vectorized','on'); etc, it might be telling the solvet that boundary conditions are nonlinear, that is, they depenend on the solution itself.

  1 Comment

Puneet Kumar
Puneet Kumar on 23 Jun 2019
Actually I was having dispalcement vectors at the boundaries, so I tried to interpolate using
UVdispB= @(z) interp1(x,Ub,z,'linear');
Ub is dispalcement vector at boundary and x is samples points. But I don't know that these functions are linear or nonlinear.

Sign in to comment.

Sign in to answer this question.