| 查看: 1753 | 回復(fù): 14 | ||
z770428
|
[求助]
MATLAB 定義外部函數(shù)變量
|
|
各位高手,我用MATLAB求解熱力耦合問題時(shí),把溫度場(chǎng)分析得到的熱應(yīng)變striant作為importdata輸入到結(jié)構(gòu)分析的workspace中運(yùn)行結(jié)構(gòu)分析主程序時(shí),老是提示 ??? 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ā)表 | |
|---|---|---|---|---|
|
[考研] 一志愿華東理工大學(xué),080500學(xué)碩,317分,求調(diào)劑 +12 | s1145 2026-03-31 | 13/650 |
|
|---|---|---|---|---|
|
[考研] 一志愿上海海洋大學(xué)083200食品學(xué)碩,求調(diào)劑,接受其他專業(yè) +6 | what張 2026-04-01 | 7/350 |
|
|
[考研] 26考研調(diào)劑 +4 | Wnz.20030617 2026-04-01 | 5/250 |
|
|
[考研] 材料求調(diào)劑一志愿哈工大324 +10 | 閆旭東 2026-03-28 | 12/600 |
|
|
[考研] 08開頭看過來。! +4 | wwwwffffff 2026-03-31 | 6/300 |
|
|
[考研] 085601 材料工程 313分 求調(diào)劑 +7 | Ong3 2026-03-27 | 7/350 |
|
|
[考研] 324分 085600材料與化工 +20 | 呆鵝oor 2026-03-27 | 20/1000 |
|
|
[考研] 332求調(diào)劑 +8 | Lyy930824@ 2026-03-29 | 8/400 |
|
|
[考研] 一志愿鄭大085600,310分求調(diào)劑 +6 | 李瀟可 2026-03-26 | 6/300 |
|
|
[考研] 311求調(diào)劑 +10 | 李芷新1 2026-03-31 | 10/500 |
|
|
[考研] 環(huán)境工程調(diào)劑 +9 | hyzzzzzzz. 2026-04-01 | 9/450 |
|
|
[考研] 求調(diào)劑:085600材料與化工,考材科基,總分319 +17 | 678lucky 2026-03-31 | 21/1050 |
|
|
[考研] 一志愿:西北大學(xué),英一數(shù)一408-284分求調(diào)劑 +7 | 12.27 2026-03-27 | 7/350 |
|
|
[考研] 一志愿a區(qū)211,085601-307分求調(diào)劑 +10 | 黨嘉豪 2026-03-31 | 23/1150 |
|
|
[考研] 340求調(diào)劑 +4 | 希望如此i 2026-03-31 | 4/200 |
|
|
[考研] 085602化工求調(diào)劑(331分) +8 | 111@127 2026-03-30 | 8/400 |
|
|
[考研] 285求調(diào)劑 +6 | AZMK 2026-03-29 | 9/450 |
|
|
[考研] 0703化學(xué)321分求調(diào)劑 +10 | 三dd. 2026-03-30 | 11/550 |
|
|
[考研] 本科雙非材料,跨考一志愿華電085801電氣,283求調(diào)劑,任何專業(yè)都可以 +6 | 芝士雪baoo 2026-03-28 | 8/400 |
|
|
[考研] 295求調(diào)劑 +5 | 1428151015 2026-03-27 | 6/300 |
|