How can I resolve the error "PDE coefficients cannot be function of solution or time." in a static solution of a PDE.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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';
0 commentaires
Réponses (1)
Ravi Kumar
le 21 Juin 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.
Regards,
Ravi
Voir également
Catégories
En savoir plus sur Boundary Conditions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!