time dependent diffusion coefficient
25 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I'm trying to solve the diffusion equation with time dependent c and f coefficients. The diffusion coefficient c is a function of temperature T and the temperature varies with time (t) :
% diffusion coefficient (c_coeff)
T = a*exp(-b*t) - d*t + h
c = D*exp(E/(R*T))
% source term
s = m*exp(n*t)
Can you help me to express these coefficients as functions that can be used in Pdetool or in the following code?
model = createpde();
% Call the geometry considered to solve the PDE
[ dl ] = geometry () ;
geometryFromEdges(model,dl);
%Apply Dirichlet Boundary conditions
applyBoundaryCondition(model,'dirichlet','Edge',1:model.Geometry.NumEdges,'u',0);
% Define the time step
time = 0:0.01:1;
% Define pde coefficients
specifyCoefficients(model,'m',0,'d',1,'c',@c_coef,'a',0,'f',@source, 'face',1);
% Initial conditions
setInitialConditions(model,0);
% Generate the Mesh
generateMesh(model,'GeometricOrder','linear');
% Solve the pde
results = solvepde(model,time);
Thanks
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Geometry and Mesh 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!