初版gui
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
function config = load_case_template(case_id)
|
||||
%LOAD_CASE_TEMPLATE Load a predefined case template into unified config.
|
||||
|
||||
arguments
|
||||
case_id
|
||||
end
|
||||
|
||||
case_key = normalize_case_id(case_id);
|
||||
|
||||
switch case_key
|
||||
case "case01"
|
||||
config = load_case_template_case01();
|
||||
otherwise
|
||||
error('load_case_template:UnsupportedCase', ...
|
||||
'Unsupported case template: %s', string(case_key));
|
||||
end
|
||||
end
|
||||
|
||||
function case_key = normalize_case_id(case_id)
|
||||
if isnumeric(case_id)
|
||||
case_key = "case" + compose("%02d", case_id);
|
||||
else
|
||||
case_key = lower(string(case_id));
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,189 @@
|
||||
function config = load_case_template_case01()
|
||||
%LOAD_CASE_TEMPLATE_CASE01 Build config for case 1.
|
||||
|
||||
config = create_empty_config();
|
||||
|
||||
config.meta.case_name = 'case01_multicomponent_irregular_domain';
|
||||
config.meta.case_id = 'case01';
|
||||
config.meta.description = 'Multicomponent flow with irregular heterogeneous domain';
|
||||
config.meta.source_case_folder = 'CASE01_FOLDER';
|
||||
config.meta.created_from_template = 'case01';
|
||||
|
||||
config.model.modelflag = 1;
|
||||
config.model.grid_model = 1;
|
||||
config.model.flow_model = 3;
|
||||
|
||||
config.grid.dx = 50 * ones(1, 20);
|
||||
config.grid.dy = 50 * ones(1, 10);
|
||||
config.grid.dz = 10 * ones(1, 1);
|
||||
config.grid.nx = numel(config.grid.dx);
|
||||
config.grid.ny = numel(config.grid.dy);
|
||||
config.grid.nz = numel(config.grid.dz);
|
||||
config.grid.NTG = ones(config.grid.nx * config.grid.ny * config.grid.nz, 1);
|
||||
|
||||
config.fracture.input_style = 1;
|
||||
config.fracture.input_content = {
|
||||
[255,255,5],90,90,0,200,10,1;
|
||||
[305,255,5],90,90,0,200,10,1;
|
||||
[355,255,5],90,90,0,200,10,1;
|
||||
[405,255,5],90,90,0,200,10,1;
|
||||
[455,255,5],90,90,0,200,10,1;
|
||||
[505,255,5],90,90,0,200,10,1;
|
||||
[555,255,5],90,90,0,200,10,1;
|
||||
[605,255,5],90,90,0,200,10,1;
|
||||
[655,255,5],90,90,0,200,10,1;
|
||||
[705,255,5],90,90,0,200,10,1;
|
||||
[755,255,5],90,90,0,200,10,1;
|
||||
};
|
||||
config.fracture.flowBarrierFlags = [];
|
||||
|
||||
config.discretization.mode = 1;
|
||||
config.discretization.sp.boundary_polygon = [
|
||||
0,100;
|
||||
800,50;
|
||||
1000,150;
|
||||
1000,350;
|
||||
800,450;
|
||||
0,400;
|
||||
0,100];
|
||||
config.discretization.sp.invalid_layer = [];
|
||||
config.discretization.sp.matrix.prpor = 20;
|
||||
config.discretization.sp.matrix.cpor = 1.0e-5;
|
||||
config.discretization.sp.matrix.rock_density = 2700;
|
||||
config.discretization.sp.fracture.prporf = 20;
|
||||
config.discretization.sp.fracture.cporf = 1.0e-5;
|
||||
config.discretization.sp.stress.fracture_factor = 0.0;
|
||||
config.discretization.sp.stress.matrix_factor = 0.0;
|
||||
config.discretization.sp.stress.ref_pressure = 20;
|
||||
|
||||
config.flow.multi_component.Ds = 0.76e-9;
|
||||
config.flow.multi_component.Db = 2.2e-9;
|
||||
config.flow.multi_component.c_ca_table = [
|
||||
0 0 0;
|
||||
0.05 1 0.075;
|
||||
0.1 1.75 0.125;
|
||||
0.2 3 0.2;
|
||||
0.5 4.35 0.325;
|
||||
1 4.55 0.365];
|
||||
config.flow.multi_component.R = 0.008314;
|
||||
config.flow.multi_component.Vm = 18.02e-6;
|
||||
config.flow.multi_component.Temperature = 293.15;
|
||||
config.flow.multi_component.x_matrix = 0.9;
|
||||
config.flow.multi_component.x_fracture = 1.0;
|
||||
config.flow.multi_component.cs_Nc = [
|
||||
0 1.6e-6 30;
|
||||
0.1 9.5e-6 10;
|
||||
0.2 2.5e-5 4;
|
||||
0.5 5.8e-5 1.4;
|
||||
1 8.2e-5 1;
|
||||
2 8.8e-5 0.75];
|
||||
config.flow.multi_component.kr_nosurf = [
|
||||
0 0 0.64;
|
||||
0.25 0 0.64;
|
||||
0.30 0.072 0.6;
|
||||
0.40 0.14 0.56;
|
||||
0.50 0.26 0.48;
|
||||
0.60 0.4 0.38;
|
||||
0.70 0.56 0.26;
|
||||
0.85 0.88 0;
|
||||
1 0.88 0];
|
||||
config.flow.multi_component.kr_surf = [
|
||||
0 0 0.6;
|
||||
0.18 0 0.6;
|
||||
0.25 0.056 0.56;
|
||||
0.30 0.1 0.52;
|
||||
0.40 0.19 0.42;
|
||||
0.50 0.29 0.3;
|
||||
0.60 0.37 0.19;
|
||||
0.75 0.46 0;
|
||||
1 0.46 0];
|
||||
config.flow.multi_component.PC = [
|
||||
0 3.8916;
|
||||
0.2 3.8916;
|
||||
0.316 0.5796;
|
||||
0.435 0.3724;
|
||||
0.562 0.2425;
|
||||
0.614 0.0608;
|
||||
0.702 0.0372;
|
||||
0.812 0.0137;
|
||||
0.875 0.0104;
|
||||
0.906 0.009;
|
||||
0.937 0.0075;
|
||||
0.969 0.0059;
|
||||
1 0];
|
||||
config.flow.multi_component.cs_Nc_fracture = config.flow.multi_component.cs_Nc;
|
||||
config.flow.multi_component.kr_nosurf_fracture = config.flow.multi_component.kr_nosurf;
|
||||
config.flow.multi_component.kr_surf_fracture = config.flow.multi_component.kr_surf;
|
||||
config.flow.multi_component.PC_fracture = config.flow.multi_component.PC;
|
||||
config.flow.multi_component.ifpcgl = 0;
|
||||
config.flow.multi_component.p_grad_threshold = 0.01;
|
||||
config.flow.multi_component.gas_prop.VL = 0.0;
|
||||
config.flow.multi_component.gas_prop.PL = 3.5;
|
||||
config.flow.multi_component.gas_prop.Kn = 0;
|
||||
config.flow.multi_component.gas_prop.stress_factor_fracture = 0.0;
|
||||
config.flow.multi_component.gas_prop.stress_factor_matrix = 0.0;
|
||||
config.flow.multi_component.gas_prop.stress_factor_ref_pressure = 20;
|
||||
config.flow.multi_component.gas_prop.beta_non_darcy_flow = 0;
|
||||
config.flow.multi_component.density_g_sc = 800;
|
||||
config.flow.multi_component.gas_model = 1;
|
||||
config.flow.multi_component.prg = 20;
|
||||
config.flow.multi_component.Bgi = 1;
|
||||
config.flow.multi_component.cg = 5e-4;
|
||||
config.flow.multi_component.vgi = 6;
|
||||
config.flow.multi_component.cvg = 0;
|
||||
config.flow.multi_component.density_w_sc = 1000;
|
||||
config.flow.multi_component.prw = 20;
|
||||
config.flow.multi_component.Bwi = 1.0;
|
||||
config.flow.multi_component.cw = 4.0e-4;
|
||||
config.flow.multi_component.vwi = 1;
|
||||
config.flow.multi_component.cvw = 0;
|
||||
config.flow.multi_component.number_state_variables = 4;
|
||||
|
||||
config.initial.pressure = 20;
|
||||
config.initial.sw = 0.2;
|
||||
config.initial.cs = 0.0;
|
||||
config.initial.cb = 0.0;
|
||||
|
||||
config.wells.well1 = {};
|
||||
config.wells.num_fracture_wells = 1;
|
||||
config.wells.welloc = {
|
||||
[
|
||||
255,255,5;
|
||||
305,255,5;
|
||||
355,255,5;
|
||||
405,255,5;
|
||||
455,255,5;
|
||||
505,255,5;
|
||||
555,255,5;
|
||||
605,255,5;
|
||||
655,255,5;
|
||||
705,255,5;
|
||||
755,255,5
|
||||
]};
|
||||
config.wells.well2 = {
|
||||
'w1', 0, [], 0.178/2, 0, 4
|
||||
};
|
||||
|
||||
config.schedule.number_phases = 3;
|
||||
config.schedule.time = [10; 30; 200];
|
||||
config.schedule.dtmax = [0.1; 0.5; 0.5];
|
||||
config.schedule.dtmin = [0.001; 0.001; 0.001];
|
||||
config.schedule.well_schedules = {
|
||||
{
|
||||
'w1','open','inj','const_pwf',40,40,'Cs_inj',0.5,'Cb_inj',1
|
||||
};
|
||||
{
|
||||
'w1','open','pro','const_q',0,0
|
||||
};
|
||||
{
|
||||
'w1','open','pro','const_pwf',10,10
|
||||
}};
|
||||
|
||||
config.solver.yitap = 5;
|
||||
config.solver.yitas = 0.04;
|
||||
config.solver.omega = 0.5;
|
||||
config.solver.Nmax = 50;
|
||||
config.solver.epsave = 1e-6;
|
||||
config.solver.epsmax = 1e-6;
|
||||
|
||||
config.output.result_name = 'case01_default_run';
|
||||
Reference in New Issue
Block a user