3D Multi-Domain PDE Modelling

23 Ansichten (letzte 30 Tage)
ADSW121365
ADSW121365 am 6 Jan. 2020
Bearbeitet: ADSW121365 am 15 Jun. 2020
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.

Akzeptierte Antwort

Ravi Kumar
Ravi Kumar am 7 Jan. 2020
Thanks for taking time to explain the problem with such a detail and for providing the reproduction code. I tried to understand and reproduce the behavior. However, one function you have used in f_coeffunction_2v.m, quad_find(), is missing from the attachment. It would help if you can attach that.
While I still don’t fully understand the setup of f-coefficient, I don’t have access to the paper, I think I sort have a clue what is going on. First, we need to understand how the two volumes (subdomains C1 and C2) that form the problem domain are related. As per the current setup, I don’t see any coupling between C1 and C2. That is C1 will have its own set of elements and C2 will have its own. Refer to this mesh plot below that I obtained using the commands:
elementsSection = model.Mesh.findElements('box',[0.0,0.5],[-0.6,0.6],[-0.6,0.6]);
figure
pdemesh(model.Mesh.Nodes,model.Mesh.Elements(:,elementsSection))
figure
pdemesh(model.Mesh.Nodes,model.Mesh.Elements(:,elementsSection),'FaceAlpha',0.4)
ElementSection1.png
ElementSection2.png
I guess this is not what you intend to model, right? I am guessing you want model the conductor at the center and volume of air around it to solve for A in that air domain. If so, then I think you need subdomains that don’t overlap but share interface boundaries. Would you have able to generate the mesh in gmsh such that two volumes stay separate?
Regards,
Ravi
  6 Kommentare
JJC
JJC am 13 Mai 2020
How was the mesh issue solved?
ADSW121365
ADSW121365 am 15 Jun. 2020
Bearbeitet: ADSW121365 am 15 Jun. 2020
The Coherence; command at the start of my GMSH script.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by