| 查看: 2023 | 回复: 4 | ||||
[求助]
如何用matlab通过编程求解油膜压力? 已有1人参与
|
|
没有找到相关教材,买的matlab一本通都是基本程序和操作,请问怎么学习这方面的东西呢?能不能请大家点拨一下 发自小木虫IOS客户端 |
» 收录本帖的淘帖专辑推荐
程序 |
» 猜你喜欢
拟解决的关键科学问题还要不要写
已经有6人回复
存款400万可以在学校里躺平吗
已经有14人回复
Materials Today Chemistry审稿周期
已经有6人回复
基金委咋了?2026年的指南还没有出来?
已经有10人回复
基金申报
已经有6人回复
推荐一本书
已经有13人回复
国自然申请面上模板最新2026版出了吗?
已经有17人回复
纳米粒子粒径的测量
已经有8人回复
疑惑?
已经有5人回复
计算机、0854电子信息(085401-058412)调剂
已经有5人回复
cguoguo2014
银虫 (正式写手)
- 应助: 0 (幼儿园)
- 金币: 1567.8
- 散金: 190
- 红花: 2
- 帖子: 340
- 在线: 50.5小时
- 虫号: 3990142
- 注册: 2015-07-25
- 专业: 机械摩擦学与表面技术
2楼2015-10-31 10:56:48
FMStation
至尊木虫 (知名作家)
- 仿真EPI: 1
- 应助: 591 (博士)
- 贵宾: 0.03
- 金币: 18175.7
- 红花: 97
- 帖子: 8891
- 在线: 1487.4小时
- 虫号: 2400059
- 注册: 2013-04-04
- 专业: 计算机应用技术
【答案】应助回帖
|
http://www.mathworks.com/help/pd ... n-a-thin-plate.html == Problem Parameters == k = 400; % thermal conductivity of copper, W/(m-K) rho = 8960; % density of copper, kg/m^3 specificHeat = 386; % specific heat of copper, J/(kg-K) thick = .01; % plate thickness in meters stefanBoltz = 5.670373e-8; % Stefan-Boltzmann constant, W/(m^2-K^4) hCoeff = 1; % Convection coefficient, W/(m^2-K) % The ambient temperature is assumed to be 300 degrees-Kelvin. ta = 300; emiss = .5; % emissivity of the plate surface == Create the PDE Model with a single dependent variable == numberOfPDE = 1; pdem = createpde(numberOfPDE); == Geometry == width = 1; height = 1; % define the square by giving the 4 x-locations followed by the 4 % y-locations of the corners. gdm = [3 4 0 width width 0 0 0 height height]'; g = decsg(gdm, 'S1', ('S1')'); % Convert the DECSG geometry into a geometry object % on doing so it is appended to the PDEModel geometryFromEdges(pdem,g); % Plot the geometry and display the edge labels for use in the boundary % condition definition. figure; pdegplot(pdem,'edgeLabels','on'); axis([-.1 1.1 -.1 1.1]); title 'Geometry With Edge Labels Displayed'; == Definition of PDE Coefficients == c = thick*k; % Because of the radiation boundary condition, the "a" coefficient % is a function of the temperature, u. It is defined as a MATLAB % expression so it can be evaluated for different values of u % during the analysis. a = @(~,state) 2*hCoeff + 2*emiss*stefanBoltz*state.u.^3; f = 2*hCoeff*ta + 2*emiss*stefanBoltz*ta^4; d = thick*rho*specificHeat; specifyCoefficients(pdem,'m',0,'d',0,'c',c,'a',a,'f',f); == Boundary Conditions == applyBoundaryCondition(pdem,'Edge',1,'u',1000); == Initial guess == setInitialConditions(pdem,0); == Mesh == hmax = .1; % element size msh = generateMesh(pdem,'Hmax',hmax); figure; pdeplot(pdem); axis equal title 'Plate With Triangular Element Mesh' xlabel 'X-coordinate, meters' ylabel 'Y-coordinate, meters' == Steady State Solution == R = solvepde(pdem); u = R.NodalSolution; figure; pdeplot(pdem,'xydata',u,'contour','on','colormap','jet'); title 'Temperature In The Plate, Steady State Solution' xlabel 'X-coordinate, meters' ylabel 'Y-coordinate, meters' axis equal p=msh.Nodes; plotAlongY(p,u,0); title 'Temperature As a Function of the Y-Coordinate' xlabel 'X-coordinate, meters' ylabel 'Temperature, degrees-Kelvin' fprintf('Temperature at the top edge of the plate = %5.1f degrees-K\n', ... u(4)); == Transient Solution == specifyCoefficients(pdem,'m',0,'d',d,'c',c,'a',a,'f',f); endTime = 5000; tlist = 0:50:endTime; numNodes = size(p,2); % Set the initial temperature of all nodes to ambient, 300 K u0(1:numNodes) = 300; % Find all nodes along the bottom edge and set their initial temperature % to the value of the constant BC, 1000 K nodesY0 = abs(p(2, ) < 1.0e-5;u0(nodesY0) = 1000; ic = @(~) u0; setInitialConditions(pdem,ic); % Set solver options pdem.SolverOptions.RelativeTolerance = 1.0e-3; pdem.SolverOptions.AbsoluteTolerance = 1.0e-4; % |solvepde| automatically picks the parabolic solver to obtain the solution. R = solvepde(pdem,tlist); u = R.NodalSolution; figure; plot(tlist,u(3, );grid on title 'Temperature Along the Top Edge of the Plate as a Function of Time' xlabel 'Time, seconds' ylabel 'Temperature, degrees-Kelvin' % figure; pdeplot(pdem,'xydata',u(:,end),'contour','on','colormap','jet'); title(sprintf('Temperature In The Plate, Transient Solution( %d seconds)\n', ... tlist(1,end))); xlabel 'X-coordinate, meters' ylabel 'Y-coordinate, meters' axis equal; % fprintf('\nTemperature at the top edge of the plate(t = %5.1f secs) = %5.1f degrees-K\n', ... tlist(1,end), u(4,end)); |
3楼2016-06-22 06:30:10
FMStation
至尊木虫 (知名作家)
- 仿真EPI: 1
- 应助: 591 (博士)
- 贵宾: 0.03
- 金币: 18175.7
- 红花: 97
- 帖子: 8891
- 在线: 1487.4小时
- 虫号: 2400059
- 注册: 2013-04-04
- 专业: 计算机应用技术
4楼2016-06-22 06:42:36
FMStation
至尊木虫 (知名作家)
- 仿真EPI: 1
- 应助: 591 (博士)
- 贵宾: 0.03
- 金币: 18175.7
- 红花: 97
- 帖子: 8891
- 在线: 1487.4小时
- 虫号: 2400059
- 注册: 2013-04-04
- 专业: 计算机应用技术
5楼2016-06-22 06:43:32











回复此楼
) < 1.0e-5;