| 查看: 1752 | 回復(fù): 14 | ||
z770428
|
[求助]
MATLAB 定義外部函數(shù)變量
|
|
各位高手,我用MATLAB求解熱力耦合問題時,把溫度場分析得到的熱應(yīng)變striant作為importdata輸入到結(jié)構(gòu)分析的workspace中運(yùn)行結(jié)構(gòu)分析主程序時,老是提示 ??? Undefined function or variable 'straint'. straint是一100*3矩陣, 我想問如何在結(jié)構(gòu)分析主程序中定義straint? |
銀蟲 (正式寫手)

銀蟲 (正式寫手)

金蟲 (正式寫手)
銀蟲 (初入文壇)

金蟲 (正式寫手)
金蟲 (正式寫手)
金蟲 (正式寫手)
銀蟲 (正式寫手)

金蟲 (正式寫手)
|
clear all; close all; clc; format compact; tic; global CRACK NODES straint ; %%%% Pre-Processing %%%%% inputQuasiStatic; % Define the geometry, materials, discontinuities iter = numIterations; for i = 1:iter %%%%% Processing %%%%% if i == 1, connectivity; pHDOF = []; else NODES(:,4:29) = 0; end % Define connectivity omega = levelSet(i); % Create phi and psi, define enriched elements straint=? [DOF,DISP] = calcDOF; % Total degrees of freedom [updElem] = enrElem(i,pHDOF); % Find enriched elements, inclusion elements if i == 1, globalK = displacementstiffnessMatrix(omega,DOF,iter,updElem); % Construct global stiffness matrix % else globalK = updatedisplacementStiffness(globalK,omega,DOF,updElem,pHDOF); end % Update the global stiffness matrix freeDOF = boundaryCond(DOF); globalF = forceVector(DOF,i,straint); % Construct global force vector % Solve for the degrees of freedom DISP(freeDOF, = globalK(freeDOF,freeDOF)\globalF(freeDOF, ; % Find the nodal displacement values%%% Post-Processing %%%%% if i == iter, plotMain(omega,DISP); end % Make plots if isempty(CRACK) == 0 pHDOF = 2*max(NODES(:,2)); % Maximum constant DOF at current iteration [KI,KII] = JIntegral(omega,DISP); % Calculate the stress intensity factors exit = growCrack(KI,KII,omega); % Advance crack for quasi-static growth globalF = forceVector(DOF,i,straint); if strcmp(exit,'YES') == 1 disp('WARNING: No crack growth, iterations exited early.') plotMain(omega,DISP); break end end disp(['Iteration ',num2str(i),' completed. Elapsed time is ',num2str(toc,'%0.4f'),'.']) end |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 318求調(diào)劑 +3 | 篤行致遠(yuǎn). 2026-03-31 | 4/200 |
|
|---|---|---|---|---|
|
[考研] 071000生物學(xué)調(diào)劑 +6 | 知昭蔓 2026-04-02 | 6/300 |
|
|
[考研] 348求調(diào)劑 +6 | 吳彥祖24k 2026-04-02 | 6/300 |
|
|
[考研] 一志愿北京科技大學(xué)材料學(xué)碩328分求調(diào)劑 +6 | 1段時間 2026-03-31 | 7/350 |
|
|
[考研] 314求調(diào)劑 +11 | 1xiaojun23 2026-03-31 | 12/600 |
|
|
[考研] 311求調(diào)劑 +14 | 藍(lán)月亮亮 2026-03-30 | 14/700 |
|
|
[考研] 377求調(diào)劑 +3 | RASKIN 2026-04-02 | 3/150 |
|
|
[考研] 367求調(diào)劑 +8 | 芋泥啵! 2026-03-28 | 8/400 |
|
|
[考研] 302求調(diào)劑一志愿北航070300,本科鄭大化學(xué) +8 | 圣日耳曼條 2026-04-01 | 11/550 |
|
|
[考研] 求調(diào)劑0703 +5 | 周嘉堯 2026-03-31 | 8/400 |
|
|
[考研] 材料科學(xué)與工程339求調(diào)劑 +11 | hyz0119 2026-03-31 | 12/600 |
|
|
[考研] 070300求調(diào)劑306分 +5 | 26要上岸 2026-03-27 | 5/250 |
|
|
[考研] 322求調(diào)劑 +8 | 三水sss 2026-04-01 | 8/400 |
|
|
[考研] 375求調(diào)劑 +7 | 雨夏整夜 2026-03-29 | 7/350 |
|
|
[考研] 生物考研337分求調(diào)劑 +4 | cgxin 2026-03-30 | 6/300 |
|
|
[考研] 266分,求材料冶金能源化工等調(diào)劑 +8 | 哇呼哼呼哼 2026-03-27 | 10/500 |
|
|
[考研] 083000環(huán)境科學(xué)與工程調(diào)劑,總分281 +4 | 橙子(勝意) 2026-03-30 | 4/200 |
|
|
[考研] 297 地理學(xué)070500 復(fù)試求調(diào)劑 +3 | 小圓圈圈ooo 2026-03-30 | 3/150 |
|
|
[考研] 求調(diào)劑 +10 | 張zz111 2026-03-27 | 11/550 |
|
|
[考研] 085602 化工專碩 338分 求調(diào)劑 +12 | 路癡小琪 2026-03-27 | 12/600 |
|