3D Multi-Domain PDE Modelling
Mostrar comentarios más antiguos
The associated geometry for my problem is given below, where cell 1 is the current containing region and cell 2 is the surrounding space. The mesh is produced via gmsh and imported to MATLAB to deal with the limitations noted here:

An example code to do this is given below, please excuse the terrible use of global variables in this piece of demo code:
clear,close all; clc;
N = 3; %Number of Equations
model = createpde(N); %Value = #Variables
%% Import gmsh mesh:
Total_Smoothed_Hollow_TwoCell
elements = msh.TETS;
geom2 = geometryFromMesh(model,nodes,elements);
%% Variables:
global I_mag N_wire L_inner L_outer Z_height mu_o
I_mag = 20;
N_wire = 861;
Z_height = 8.89e-2;
L_inner = 10.42e-2;
L_outer = 15.24e-2;
mu_o = 4*pi*10^(-7);
%% Region 1:
c_coeff = zeros(9*N^2,1);
c_coeff = c_coeffassign_2v(c_coeff,N);
specifyCoefficients(model,'m',0,'d',0,'c',c_coeff,'a',0,'f',@f_coeffunction,'Cell',1); %Outer
%% UNCOMMENT ME FOR NON-SINGULAR 'RESULTS' %%
%applyBoundaryCondition(model,'dirichlet','Face',[1,2,3,4,5,6,7,8,9,10],'u',[0;0;0]);
%% Region 2:
c_coeff = zeros(9*N^2,1);
c_coeff = c_coeffassign_2v(c_coeff,N);
specifyCoefficients(model,'m',0,'d',0,'c',c_coeff,'a',0,'f',[0;0;0],'Cell',2);
applyBoundaryCondition(model,'dirichlet','Face',[11,12,13,14,15,16],'u',[0;0;0]);
%% Solving:
results = solvepde(model);
vals = results.NodalSolution;
The code as given provides error message:
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 7.084396e-18.
> In pde.EquationModel/solveStationary (line 49)
In pde.PDEModel/solvepde (line 74)
In MATHWORKS_PDETOOL_SIMPIF (line 54)
Other Attempts and Related Work:
The addition of a second boundary condition on this (the commented out one in the above) removes this singular warning however the solution is then nearly all zeros.
I have also tried using neumann conditions in various formats for the two regions to no avail. Combinations of dirichlet for one region and Neumann for the other have also been considered.
In the context of the PDE Toolbox, what does the singular warning actually mean? I'm assuming there is some error in my setup somewhere.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Structural Mechanics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


