# Complete-ASM-NN on water flow: von Karman effect ## Simulation Water flow simulation of cylinder von Karman effect ![](https://i.imgur.com/QDm9L58.gif) :::info **Reynolds number** = density of the fluid$\times$flow speed$\times$characteristic linear dimension/dynamic viscosity of the fluid **Reynolds number** determines the behavior ::: ![](https://i.imgur.com/0v8Olzu.jpg) ![](https://i.imgur.com/s4W5ksY.jpg) ![](https://i.imgur.com/TASw1lO.jpg) ![](https://i.imgur.com/cwZFNOV.png) ## data summary ![](https://i.imgur.com/HzJi6MX.png) :::info x-axis: sample time (unit: 500s) y-axis: location (unit: 0.1m) entry value: water x-velocity (unit: m/s) ::: | Min | 25th Percentile | Median | 75th Percentile | Max | -------- | -------- | -------- |-------- | -------- | | 6.258897e-06 | 7.727324e-05 | 1.1245722e-04 | 1.219506e-04 | 1.39250e-04 | | **Mean** | **std** | -------- |-------- | -------- | | 9.7317653e-05 | 3.317341e-05 | Text | Text | Text | ## ASM Implementation | v_f | v_c | sigma | zeta |v_threshold |v_delta | | -------- | -------- | -------- |-------- | -------- |-------- | | 0.0001 | -0.0001 | 0.5 | 250 |0.00009 |0.00004| The reconstruction error 1 is 0.13853908996947964 The reconstruction error 2 is 0.14163856893550444 ![](https://i.imgur.com/8DhiwqX.png) ### Complete-ASM-NN results: The training error is 0.020063613855071518 The reconstruction error is 0.10146872252500364 ![](https://i.imgur.com/JZWpCgy.png) The training error is 0.02031472284401133 The reconstruction error is 0.09989442553699493 ![](https://i.imgur.com/fMw5KkM.png) The training error is 0.020254287805192273 The reconstruction error is 0.09980701034450298 ![](https://i.imgur.com/bETjwZU.png) **Additional attempts** | v_f | v_c | sigma | zeta |v_threshold |v_delta | | -------- | -------- | -------- |-------- | -------- |-------- | | 0.00011 | -0.00011 | 0.4 | 1000 |1 |1| The reconstruction error 1 is 0.11869534759921051 The reconstruction error 2 is 0.12113336954054438 ![](https://i.imgur.com/1B3VpdK.png) Modified Cost Function Filter : $[[-0.5,-0.5,0],[-1.,3.,0],[-0.5,-0.5,0]]$ The training error is 0.009492165068873109 The reconstruction error is 0.09988091259620421 ![](https://i.imgur.com/jOwZQO4.png) ### ASM-NN results: ### Two a priori estimates | v_f | v_c | sigma | zeta |v_threshold |v_delta | | -------- | -------- | -------- |-------- | -------- |-------- | | 0.00011 | -0.00011 | 0.5 | 1000 |0.00009 |0.00004| The training error is 0.08592179626054416 The reconstruction error is 0.1315701121928401 ![](https://i.imgur.com/kMLy2AV.png) The training error is 0.0859217793442029 The reconstruction error is 0.13156315163192406 ![](https://i.imgur.com/YA7mYzh.png) ### Multiple a priori estimates The training error is 0.08259863177054745 The reconstruction error is 0.13143098690736998 ![](https://i.imgur.com/FkIFYzL.png) The training error is 0.08217246402415788 The reconstruction error is 0.13146017543236363 ![](https://i.imgur.com/mI0Z5JR.png) ## Alternative Smoothing Kernel ### Gaussian Kernel (Complete-ASM-NN) The training error is 0.005021960923631318 The reconstruction error is 0.10143207932520176 ![](https://i.imgur.com/TwHQkQ6.png) The training error is 0.005138579360834681 The reconstruction error is 0.10128620831094266 ![](https://i.imgur.com/6zRB4ak.png) ### Cauchy Kernel $$ \phi(x,t) = \frac{1}{1+\frac{x^2}{\sigma^2}+\frac{t^2}{\zeta^2}} $$ The reconstruction error 1 is 0.14026903020295003 The reconstruction error 2 is 0.13761133793341268 ![](https://i.imgur.com/E2mwDUC.png) The training error is 0.1759526733093271 The reconstruction error is 0.20033726020575182 ![](https://i.imgur.com/VRXY7iF.png) The training error is 0.006275701106173028 The reconstruction error is 0.16254095612308483 ![](https://i.imgur.com/xVQxeJN.png) ### Inverse Multiquadric Kernel $$ \phi(x,t) = \frac{1}{\sqrt{\frac{x^2}{\sigma^2}+\frac{t^2}{\zeta^2}+c^2}} $$ The training error is 0.09169232114366106 The reconstruction error is 0.19937711814144976 ![](https://i.imgur.com/POFuWNB.png) ### custom kernel $$ \phi(x,t) = \exp{(-\frac{x^2}{\sigma^2}-\frac{t^2}{\zeta^2}-\alpha*\frac{(t-\tau)^2}{\zeta^2})} $$ The training error is 0.02909929568433578 The reconstruction error is 0.10109650438169683 ![](https://i.imgur.com/PrBoU0F.png) The training error is 0.029152675199157513 The reconstruction error is 0.10119950206446994 ![](https://i.imgur.com/YrnOWUI.png) ### Extra degree of freedom on $\sigma,\zeta,\tau$ $$ \phi_c(x,t) = \exp{(-\frac{x^2}{\sigma_1^2}-\frac{(t-\tau)^2}{\zeta_1^2})} \\ \phi_f(x,t) = \exp{(-\frac{x^2}{\sigma_2^2}-\frac{(t)^2}{\zeta_2^2})} $$ The training error is 0.04531668754880319 The reconstruction error is 0.09971007092771234 ![](https://i.imgur.com/VsM34vI.png) ### Weighted sum replaced by ConvAutoEncoder The training error is 0.07586432653848106 The reconstruction error is 0.10865212880642654 ![](https://i.imgur.com/pNDuA5E.png) ### wave bases $$ \phi_c(x,t) = \cos(\alpha*(\frac{x^2}{\sigma_1^2}+\frac{t^2}{\zeta_1^2}))\exp{(-\frac{x^2}{\sigma_1^2}-\frac{t^2}{\zeta_1^2})} \\ \phi_f(x,t) = \exp{(-\frac{x^2}{\sigma_2^2}-\frac{(t-\tau)^2}{\zeta_2^2})} $$ | sigma_c | zeta_c | sigma_f | zeta_f |tau |alpha | | -------- | -------- | -------- |-------- | -------- |-------- | | 0.4 | 1000 | 0.005 | 500 |5000 |1.75| The reconstruction error 1 is 0.14285462639626098 The reconstruction error 2 is 0.1511420856414609 ![](https://i.imgur.com/evzsgiV.png) The training error is 0.046841286901120584 The reconstruction error is 0.12262546200645963 ![](https://i.imgur.com/Ea8SMUB.png) Complete ASM NN: The training error is 0.006528100670980884 The reconstruction error is 0.16166204924708688 ![](https://i.imgur.com/ZGAO1rH.png) ### Extra degree of freedom on $\sigma,\zeta,\tau$ + multiple estimates The training error is 0.03511340178453521 The reconstruction error is 0.12250001436641098 ![](https://i.imgur.com/MA3NgeC.png) The training error is 0.04019386681711638 The reconstruction error is 0.11832722970795045 ![](https://i.imgur.com/21ZJlVI.png)