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

조회 수: 1 (최근 30일)
Hi
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
specifyCoefficients(model,'m',0,'d',0,...
'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
applyBoundaryCondition(model,'dirichlet','Edge',EdgeB,'u',@UVdispB,'Vectorized','on');
applyBoundaryCondition(model,'dirichlet','Edge',EdgeT,'u',@UVdispT,'Vectorized','on');
applyBoundaryCondition(model,'dirichlet','Edge',EdgeL,'u',@UVdispL,'Vectorized','on');
applyBoundaryCondition(model,'dirichlet','Edge',EdgeR,'u',@UVdispR,'Vectorized','on');
% Generate Mesh and Solve
meshsize=0.02*Lx;
grad=1.5;
generateMesh(model,'Hgrad',grad,'Hmax',meshsize,'GeometricOrder','quadratic');
%Plot the mesh.
figure (7)
pdemesh(model.Mesh.Nodes,model.Mesh.Elements);
%Assemble finite element matrices
FEM = assembleFEMatrices(model,'nullspace') ;
model.SolverOptions.ReportStatistics='on';

답변 (1개)

Ravi Kumar
Ravi Kumar 2019년 6월 21일
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.
Regards,
Ravi
  댓글 수: 1
Puneet Kumar
Puneet Kumar 2019년 6월 23일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Boundary Conditions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by