fix error
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -319,9 +319,9 @@ classdef EDFMAppController < handle
|
|||||||
obj.setNumericFieldValue('MCcvwEditField', obj.firstScalar(c.flow.multi_component.cvw));
|
obj.setNumericFieldValue('MCcvwEditField', obj.firstScalar(c.flow.multi_component.cvw));
|
||||||
|
|
||||||
obj.setTableValue('Well1Table', c.wells.well1);
|
obj.setTableValue('Well1Table', c.wells.well1);
|
||||||
obj.setTableValue('FractureWellLocationTable', c.wells.welloc);
|
obj.setTableValue('FractureWellLocationTable', c.wells.welloc{1});
|
||||||
obj.setTableValue('Well2Table', c.wells.well2);
|
obj.setTableValue('Well2Table', c.wells.well2);
|
||||||
obj.setTableValue('ScheduleTable', c.schedule.well_schedules);
|
obj.setTableValue('ScheduleTable', c.schedule.well_schedules{1});
|
||||||
obj.setTextAreaExpr('TimeTextArea', c.schedule.time);
|
obj.setTextAreaExpr('TimeTextArea', c.schedule.time);
|
||||||
obj.setTextAreaExpr('DtMinTextArea', c.schedule.dtmin);
|
obj.setTextAreaExpr('DtMinTextArea', c.schedule.dtmin);
|
||||||
obj.setTextAreaExpr('DtMaxTextArea', c.schedule.dtmax);
|
obj.setTextAreaExpr('DtMaxTextArea', c.schedule.dtmax);
|
||||||
|
|||||||
Binary file not shown.
@@ -349,8 +349,68 @@ classdef EDFM_Simulator_App < matlab.apps.AppBase
|
|||||||
TemplateDropDown matlab.ui.control.DropDown
|
TemplateDropDown matlab.ui.control.DropDown
|
||||||
end
|
end
|
||||||
|
|
||||||
properties (Access = private)
|
|
||||||
Controller EDFMAppController
|
properties (Access = public)
|
||||||
|
Controller EDFMAppController % Description
|
||||||
|
end
|
||||||
|
|
||||||
|
methods (Access = public)
|
||||||
|
|
||||||
|
function startupApp(app)
|
||||||
|
app.Controller = EDFMAppController(app);
|
||||||
|
app.Controller.startup();
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
% Callbacks that handle component events
|
||||||
|
methods (Access = private)
|
||||||
|
|
||||||
|
% Code that executes after component creation
|
||||||
|
function startupFcn(app)
|
||||||
|
app.Controller = EDFMAppController(app);
|
||||||
|
app.Controller.startup();
|
||||||
|
end
|
||||||
|
|
||||||
|
% Button pushed function: NewConfigButton
|
||||||
|
function onNewConfig(app, event)
|
||||||
|
app.Controller.newConfig();
|
||||||
|
end
|
||||||
|
|
||||||
|
% Button pushed function: LoadTemplateButton
|
||||||
|
function onLoadTemplate(app, event)
|
||||||
|
app.Controller.loadTemplate(app.TemplateDropDown.Value)
|
||||||
|
end
|
||||||
|
|
||||||
|
% Button pushed function: ImportConfigButton
|
||||||
|
function onImportConfig(app, event)
|
||||||
|
app.Controller.importConfig();
|
||||||
|
end
|
||||||
|
|
||||||
|
% Button pushed function: ExportConfigButton
|
||||||
|
function onExportConfig(app, event)
|
||||||
|
app.Controller.exportConfig();
|
||||||
|
end
|
||||||
|
|
||||||
|
% Button pushed function: RunButton
|
||||||
|
function onRun(app, event)
|
||||||
|
app.Controller.runCurrentConfig();
|
||||||
|
end
|
||||||
|
|
||||||
|
% Button pushed function: ImportResultButton
|
||||||
|
function onImportResult(app, event)
|
||||||
|
app.Controller.importResults();
|
||||||
|
end
|
||||||
|
|
||||||
|
% Button pushed function: ExportResultButton
|
||||||
|
function onExportResult(app, event)
|
||||||
|
app.Controller.exportResults();
|
||||||
|
end
|
||||||
|
|
||||||
|
% Button pushed function: PlotResultButton
|
||||||
|
function onPlotResult(app, event)
|
||||||
|
app.Controller.plotResults();
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
% Component initialization
|
% Component initialization
|
||||||
@@ -372,31 +432,37 @@ classdef EDFM_Simulator_App < matlab.apps.AppBase
|
|||||||
|
|
||||||
% Create LoadTemplateButton
|
% Create LoadTemplateButton
|
||||||
app.LoadTemplateButton = uibutton(app.UIFigure, 'push');
|
app.LoadTemplateButton = uibutton(app.UIFigure, 'push');
|
||||||
|
app.LoadTemplateButton.ButtonPushedFcn = createCallbackFcn(app, @onLoadTemplate, true);
|
||||||
app.LoadTemplateButton.Position = [177 774 94 23];
|
app.LoadTemplateButton.Position = [177 774 94 23];
|
||||||
app.LoadTemplateButton.Text = 'Load Template';
|
app.LoadTemplateButton.Text = 'Load Template';
|
||||||
|
|
||||||
% Create ImportConfigButton
|
% Create ImportConfigButton
|
||||||
app.ImportConfigButton = uibutton(app.UIFigure, 'push');
|
app.ImportConfigButton = uibutton(app.UIFigure, 'push');
|
||||||
|
app.ImportConfigButton.ButtonPushedFcn = createCallbackFcn(app, @onImportConfig, true);
|
||||||
app.ImportConfigButton.Position = [399 774 87 23];
|
app.ImportConfigButton.Position = [399 774 87 23];
|
||||||
app.ImportConfigButton.Text = 'Import Config';
|
app.ImportConfigButton.Text = 'Import Config';
|
||||||
|
|
||||||
% Create ExportConfigButton
|
% Create ExportConfigButton
|
||||||
app.ExportConfigButton = uibutton(app.UIFigure, 'push');
|
app.ExportConfigButton = uibutton(app.UIFigure, 'push');
|
||||||
|
app.ExportConfigButton.ButtonPushedFcn = createCallbackFcn(app, @onExportConfig, true);
|
||||||
app.ExportConfigButton.Position = [532 774 88 23];
|
app.ExportConfigButton.Position = [532 774 88 23];
|
||||||
app.ExportConfigButton.Text = 'Export Config';
|
app.ExportConfigButton.Text = 'Export Config';
|
||||||
|
|
||||||
% Create RunButton
|
% Create RunButton
|
||||||
app.RunButton = uibutton(app.UIFigure, 'push');
|
app.RunButton = uibutton(app.UIFigure, 'push');
|
||||||
|
app.RunButton.ButtonPushedFcn = createCallbackFcn(app, @onRun, true);
|
||||||
app.RunButton.Position = [648 774 70 23];
|
app.RunButton.Position = [648 774 70 23];
|
||||||
app.RunButton.Text = 'Run';
|
app.RunButton.Text = 'Run';
|
||||||
|
|
||||||
% Create ImportResultButton
|
% Create ImportResultButton
|
||||||
app.ImportResultButton = uibutton(app.UIFigure, 'push');
|
app.ImportResultButton = uibutton(app.UIFigure, 'push');
|
||||||
|
app.ImportResultButton.ButtonPushedFcn = createCallbackFcn(app, @onImportResult, true);
|
||||||
app.ImportResultButton.Position = [761 774 86 23];
|
app.ImportResultButton.Position = [761 774 86 23];
|
||||||
app.ImportResultButton.Text = 'Import Result';
|
app.ImportResultButton.Text = 'Import Result';
|
||||||
|
|
||||||
% Create ExportResultButton
|
% Create ExportResultButton
|
||||||
app.ExportResultButton = uibutton(app.UIFigure, 'push');
|
app.ExportResultButton = uibutton(app.UIFigure, 'push');
|
||||||
|
app.ExportResultButton.ButtonPushedFcn = createCallbackFcn(app, @onExportResult, true);
|
||||||
app.ExportResultButton.Position = [883 774 87 23];
|
app.ExportResultButton.Position = [883 774 87 23];
|
||||||
app.ExportResultButton.Text = 'Export Result';
|
app.ExportResultButton.Text = 'Export Result';
|
||||||
|
|
||||||
@@ -2076,6 +2142,7 @@ classdef EDFM_Simulator_App < matlab.apps.AppBase
|
|||||||
|
|
||||||
% Create PlotResultButton
|
% Create PlotResultButton
|
||||||
app.PlotResultButton = uibutton(app.ResultsTab, 'push');
|
app.PlotResultButton = uibutton(app.ResultsTab, 'push');
|
||||||
|
app.PlotResultButton.ButtonPushedFcn = createCallbackFcn(app, @onPlotResult, true);
|
||||||
app.PlotResultButton.Position = [477 559 100 23];
|
app.PlotResultButton.Position = [477 559 100 23];
|
||||||
app.PlotResultButton.Text = 'PlotResult';
|
app.PlotResultButton.Text = 'PlotResult';
|
||||||
|
|
||||||
@@ -2087,68 +2154,13 @@ classdef EDFM_Simulator_App < matlab.apps.AppBase
|
|||||||
|
|
||||||
% Create NewConfigButton
|
% Create NewConfigButton
|
||||||
app.NewConfigButton = uibutton(app.UIFigure, 'push');
|
app.NewConfigButton = uibutton(app.UIFigure, 'push');
|
||||||
|
app.NewConfigButton.ButtonPushedFcn = createCallbackFcn(app, @onNewConfig, true);
|
||||||
app.NewConfigButton.Position = [284 774 94 23];
|
app.NewConfigButton.Position = [284 774 94 23];
|
||||||
app.NewConfigButton.Text = 'New Config';
|
app.NewConfigButton.Text = 'New Config';
|
||||||
|
|
||||||
app.LoadTemplateButton.ButtonPushedFcn = @(~,~)app.onLoadTemplate();
|
|
||||||
app.ImportConfigButton.ButtonPushedFcn = @(~,~)app.onImportConfig();
|
|
||||||
app.ExportConfigButton.ButtonPushedFcn = @(~,~)app.onExportConfig();
|
|
||||||
app.RunButton.ButtonPushedFcn = @(~,~)app.onRun();
|
|
||||||
app.ImportResultButton.ButtonPushedFcn = @(~,~)app.onImportResult();
|
|
||||||
app.ExportResultButton.ButtonPushedFcn = @(~,~)app.onExportResult();
|
|
||||||
app.NewConfigButton.ButtonPushedFcn = @(~,~)app.onNewConfig();
|
|
||||||
app.RunCurrentConfigButton.ButtonPushedFcn = @(~,~)app.onRun();
|
|
||||||
app.PlotResultButton.ButtonPushedFcn = @(~,~)app.onPlotResult();
|
|
||||||
app.ResultTypeDropDown.ValueChangedFcn = @(~,~)app.onPlotResult();
|
|
||||||
app.ModelFlowModelDropDown.ValueChangedFcn = @(~,~)app.onModelChanged();
|
|
||||||
app.ModelGridModelDropDown.ValueChangedFcn = @(~,~)app.onModelChanged();
|
|
||||||
|
|
||||||
% Show the figure after all components are created
|
% Show the figure after all components are created
|
||||||
app.UIFigure.Visible = 'on';
|
app.UIFigure.Visible = 'on';
|
||||||
end
|
end
|
||||||
|
|
||||||
function startupApp(app)
|
|
||||||
app.Controller = EDFMAppController(app);
|
|
||||||
app.Controller.startup();
|
|
||||||
end
|
|
||||||
|
|
||||||
function onNewConfig(app)
|
|
||||||
app.Controller.newConfig();
|
|
||||||
end
|
|
||||||
|
|
||||||
function onLoadTemplate(app)
|
|
||||||
app.Controller.loadTemplate(app.TemplateDropDown.Value);
|
|
||||||
end
|
|
||||||
|
|
||||||
function onImportConfig(app)
|
|
||||||
app.Controller.importConfig();
|
|
||||||
end
|
|
||||||
|
|
||||||
function onExportConfig(app)
|
|
||||||
app.Controller.exportConfig();
|
|
||||||
end
|
|
||||||
|
|
||||||
function onRun(app)
|
|
||||||
app.Controller.runCurrentConfig();
|
|
||||||
end
|
|
||||||
|
|
||||||
function onImportResult(app)
|
|
||||||
app.Controller.importResults();
|
|
||||||
end
|
|
||||||
|
|
||||||
function onExportResult(app)
|
|
||||||
app.Controller.exportResults();
|
|
||||||
end
|
|
||||||
|
|
||||||
function onPlotResult(app)
|
|
||||||
app.Controller.plotResults();
|
|
||||||
end
|
|
||||||
|
|
||||||
function onModelChanged(app)
|
|
||||||
if ~isempty(app.Controller)
|
|
||||||
app.Controller.syncModelTabs();
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
% App creation and deletion
|
% App creation and deletion
|
||||||
@@ -2163,7 +2175,8 @@ classdef EDFM_Simulator_App < matlab.apps.AppBase
|
|||||||
% Register the app with App Designer
|
% Register the app with App Designer
|
||||||
registerApp(app, app.UIFigure)
|
registerApp(app, app.UIFigure)
|
||||||
|
|
||||||
runStartupFcn(app, @(~,~)startupApp(app));
|
% Execute the startup function
|
||||||
|
runStartupFcn(app, @startupFcn)
|
||||||
|
|
||||||
if nargout == 0
|
if nargout == 0
|
||||||
clear app
|
clear app
|
||||||
@@ -2177,4 +2190,4 @@ classdef EDFM_Simulator_App < matlab.apps.AppBase
|
|||||||
delete(app.UIFigure)
|
delete(app.UIFigure)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -129,9 +129,6 @@ config.flow = struct( ...
|
|||||||
'vwi', [], ...
|
'vwi', [], ...
|
||||||
'cvw', [], ...
|
'cvw', [], ...
|
||||||
'ifpcgl', 0, ...
|
'ifpcgl', 0, ...
|
||||||
'Ppr', [], ...
|
|
||||||
'BG', [], ...
|
|
||||||
'MUG', [], ...
|
|
||||||
'matrix_relperm_table', [], ...
|
'matrix_relperm_table', [], ...
|
||||||
'fracture_relperm_table', []), ...
|
'fracture_relperm_table', []), ...
|
||||||
'oil_water', struct( ...
|
'oil_water', struct( ...
|
||||||
@@ -152,9 +149,6 @@ config.flow = struct( ...
|
|||||||
'vwi', [], ...
|
'vwi', [], ...
|
||||||
'cvw', [], ...
|
'cvw', [], ...
|
||||||
'ifpcow', 0, ...
|
'ifpcow', 0, ...
|
||||||
'Ppr', [], ...
|
|
||||||
'BO', [], ...
|
|
||||||
'MUO', [], ...
|
|
||||||
'matrix_relperm_table', [], ...
|
'matrix_relperm_table', [], ...
|
||||||
'fracture_relperm_table', [], ...
|
'fracture_relperm_table', [], ...
|
||||||
'beta_non_darcy_flow', 0, ...
|
'beta_non_darcy_flow', 0, ...
|
||||||
|
|||||||
Reference in New Issue
Block a user