comprz_maxc=100, # compression of the columns of Z by QR comprz_thresh=5e-5, # threshold for trunc of SVD save_full_z=False # whether to save the uncompressed Z ) probsetupdict = dict(problemname='cylinderwake', N=3, spec_tip_dict=spec_tip_dict, clearprvveldata=True, t0=0.0, tE=2.0, Nts=50, stst_control=True, ini_vel_stokes=True, alphau=1e-4, ystar=ystar) # for nu=1e-3, i.e. Re = 150, the sys is stable probsetupdict.update(dict(nu=1e-3, comp_unco_out=False, use_ric_ini_nu=None)) optcon_nse(**probsetupdict) # for nu=8e-4 (Re=187.5) we need stabilizing initial guess probsetupdict.update(dict(nu=8e-4, comp_unco_out=False, use_ric_ini_nu=1e-3)) optcon_nse(**probsetupdict) # for nu=6e-4 (Re=250) we need stabilizing initial guess probsetupdict.update(dict(nu=6e-4, comp_unco_out=False, use_ric_ini_nu=8e-4)) optcon_nse(**probsetupdict) # compute the uncontrolled solution probsetupdict.update(dict(nu=6e-4, comp_unco_out=True, use_ric_ini_nu=8e-4))
nwtn_adi_dict = dict(adi_max_steps=300, adi_newZ_reltol=1e-7, nwtn_max_steps=20, nwtn_upd_reltol=4e-8, nwtn_upd_abstol=1e-7, verbose=True, # ms=[-15.0, -10.0, -5.0, -3.0, -2.0, -1.5, -1.3, -1.0], ms=[-5.0, -3.0, -2.0, -1.5, -1.3, -1.1, -1.0], full_upd_norm_check=False, check_lyap_res=False) alphau = 1e-07 gamma = 1e-1 # ystarstr = ['0', '0'] ystarstr = ['-0.1*sin(5*3.14*t)', '0.1*sin(5*3.14*t)'] ystar = [dolfin.Expression(ystarstr[0], t=0, degree=2), dolfin.Expression(ystarstr[1], t=0, degree=2)] scaletest = 0.2*1e1 optcon_nse(N=25, Nts=64*scaletest, nu=0.5e-2, clearprvveldata=True, closed_loop=closed_loop, stst_control=stst_control, ini_vel_stokes=True, t0=0.0, tE=0.1*scaletest, outernwtnstps=outernwtnstps, linearized_nse=True, alphau=alphau, gamma=gamma, ystar=ystar, # stokes_flow=True, nwtn_adi_dict=nwtn_adi_dict)
save_full_z=False # whether to save the uncompressed Z ) probsetupdict = dict(problemname='cylinderwake', N=3, spec_tip_dict=spec_tip_dict, clearprvveldata=True, t0=0.0, tE=2.0, Nts=50, stst_control=True, ini_vel_stokes=True, alphau=1e-4, ystar=ystar) # for nu=1e-3, i.e. Re = 150, the sys is stable probsetupdict.update(dict(nu=1e-3, comp_unco_out=False, use_ric_ini_nu=None)) optcon_nse(**probsetupdict) # for nu=8e-4 (Re=187.5) we need stabilizing initial guess probsetupdict.update(dict(nu=8e-4, comp_unco_out=False, use_ric_ini_nu=1e-3)) optcon_nse(**probsetupdict) # for nu=6e-4 (Re=250) we need stabilizing initial guess probsetupdict.update(dict(nu=6e-4, comp_unco_out=False, use_ric_ini_nu=8e-4)) optcon_nse(**probsetupdict) # compute the uncontrolled solution probsetupdict.update(dict(nu=6e-4, comp_unco_out=True, use_ric_ini_nu=8e-4)) optcon_nse(**probsetupdict)
check_lyap_res=False) alphau = 1e-07 gamma = 1e-1 # ystarstr = ['0', '0'] ystarstr = ['-0.1*sin(5*3.14*t)', '0.1*sin(5*3.14*t)'] ystar = [ dolfin.Expression(ystarstr[0], t=0, degree=2), dolfin.Expression(ystarstr[1], t=0, degree=2) ] scaletest = 0.2 * 1e1 optcon_nse( N=25, Nts=64 * scaletest, nu=0.5e-2, clearprvveldata=True, closed_loop=closed_loop, stst_control=stst_control, ini_vel_stokes=True, t0=0.0, tE=0.1 * scaletest, outernwtnstps=outernwtnstps, linearized_nse=True, alphau=alphau, gamma=gamma, ystar=ystar, # stokes_flow=True, nwtn_adi_dict=nwtn_adi_dict)
# if t, then add t=0 to both comps !!1!!11 spec_tip_dict = dict( nwtn_adi_dict=dict(adi_max_steps=200, adi_newZ_reltol=1e-8, nwtn_max_steps=16, nwtn_upd_reltol=5e-8, nwtn_upd_abstol=1e-7, verbose=True, full_upd_norm_check=False, check_lyap_res=False), compress_z=True, # whether or not to compress Z comprz_maxc=60, # compression of the columns of Z by QR comprz_thresh=5e-5, # threshold for trunc of SVD save_full_z=False # whether to save the uncompressed Z ) optcon_nse(N=25, Nts=40, nu=1e-2, t0=0.0, tE=1.0, spec_tip_dict=spec_tip_dict, stst_control=False, clearprvveldata=False, ini_vel_stokes=False, comp_unco_out=False, use_ric_ini_nu=None, alphau=1e-4, ystar=ystar)
from optcont_main import optcon_nse from dolfin import Expression ystar = [Expression('0.0', t=0), Expression('0.0', t=0)] # if t, then add t=0 to both comps !!1!!11 spec_tip_dict = dict(nwtn_adi_dict=dict(adi_max_steps=200, adi_newZ_reltol=1e-8, nwtn_max_steps=16, nwtn_upd_reltol=5e-8, nwtn_upd_abstol=1e-7, verbose=True, full_upd_norm_check=False, check_lyap_res=False ), compress_z=True, # whether or not to compress Z comprz_maxc=60, # compression of the columns of Z by QR comprz_thresh=5e-5, # threshold for trunc of SVD save_full_z=False # whether to save the uncompressed Z ) optcon_nse(N=25, Nts=40, nu=1e-2, t0=0.0, tE=1.0, spec_tip_dict=spec_tip_dict, stst_control=False, clearprvveldata=False, ini_vel_stokes=False, comp_unco_out=False, use_ric_ini_nu=None, alphau=1e-4, ystar=ystar)