params.B1=2;
params.B2=1;


model=thermalblock_model(params);

model = model.set_mu(model, [1;1]);
model.ynumintervals = 10;
model.xnumintervals = 10;

model_data=model.gen_model_data(model);
detailed_data=model.gen_detailed_data(model,model_data);
sim_data=detailed_simulation(model,model_data);
figure(1)
model.plot_sim_data(model,detailed_data,sim_data);

reduced_data = model.gen_reduced_data(model,detailed_data);
rb_sim_data = rb_simulation(model, reduced_data);
rb_sim_data = rb_reconstruction(model, detailed_data, rb_sim_data);

figure(2)
model.plot_sim_data(model,reduced_data,rb_sim_data);
