How to give initial guess and initial condition for a nonlinear - time dependent PDE problem (transient non-linear heat equation) in pde tool box?
4 次查看(过去 30 天)
显示 更早的评论
I have (transient non-linear heat equation) i.e
, k = 0.7 + 0.003*T, tlist = linespace(0,0.5,20); therefore my pde coefficients wills be d = 1, m = a = 0, c = k, f = 1; since c coefficent is non linear (dependent on T, temperature), My Intial Boundary condition is 3 and initial guess is 5. But i see command IC and initial guess is same. i.e setInitialConditions(model,u0); So how do i differentiate them?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/538276/image.png)
This is how my code goes
clear,clc,close all;
model = createpde();
%% Geometry
R1 = [3;4;-1;1;1;-1;-1;-1;1;1];
g = decsg(R1);
heatmodel_geom = geometryFromEdges(model,g);
%% Mesh
msh = generateMesh(model,'GeometricOrder','linear');
[P,E,T] = meshToPet( msh );
%% Specify Coefficients
c = @(~,state) 0.7+0.003*state.u; % nonlinear coefficient
specifyCoefficients(model,'m',0,'d',1,'c',c,'a',0,'f',1);
%% Spacial BC
applyBoundaryCondition(model,'dirichlet','edge',[1 2 3 4],'u',0);
%% Initial guess and initial condition
setInitialConditions(model,3); % Initial condition
setInitialConditions(model,5); % Initial guess to solve non linear pde.... BUT DO I DIFFERENTIATE BOTH THIS COMMANDS TO ITS RESPECTIVE JOBS
0 个评论
采纳的回答
Ravi Kumar
2021-3-4
For nonlinear elliptic problem, inputs in setInitialCcnditions is the initial guess for the nonlinear solver. For time-dependent problems initial condiions and initial gues are one and the same.
Regards,
Ravi
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geometry and Mesh 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!