How to setup for rotating frame
How to setup for rotating frame
Dear all
I want to do test case for ideal rotating frame (as shown in the figure). The frame rotates counterclockwise. The ideal domain is in circle with land in the middle and open boundary at margin. The current direction is also in counterclockwise
I highly appreciate if you can give me any advice on how to set up the "rotating frame" in ROMS
Many thanks
I want to do test case for ideal rotating frame (as shown in the figure). The frame rotates counterclockwise. The ideal domain is in circle with land in the middle and open boundary at margin. The current direction is also in counterclockwise
I highly appreciate if you can give me any advice on how to set up the "rotating frame" in ROMS
Many thanks
- Attachments
-
- ratating_frame.JPG (27.93 KiB) Viewed 4406 times
Re: How to setup for rotating frame
Check the LAB_CANYON test case which is exactly this geometry (with canyon bathymetry).
Re: How to setup for rotating frame
Thank you very much for you good comment. I tested for "LAB_CANYON". It was good.
I have an additional question that, where does ana_grid.h get number of grids in x and y direction (in the ocean_his.nc: x_rho=251,y_rho=111)? I could not find any information of "Lm", "Mm" of "Istr" and "Jstr" in the "ana_grid.h" and "set_bounds.h"
(does it get directly from "ocean_lab_canyon.in?)
Many thanks
I have an additional question that, where does ana_grid.h get number of grids in x and y direction (in the ocean_his.nc: x_rho=251,y_rho=111)? I could not find any information of "Lm", "Mm" of "Istr" and "Jstr" in the "ana_grid.h" and "set_bounds.h"
(does it get directly from "ocean_lab_canyon.in?)
Many thanks
Re: How to setup for rotating frame
Yes, it gets that from you ocean.in.
Re: How to setup for rotating frame
Many thanks. Kate
I have one more question that, for "LAB_CAYON" test case, I set "u" & "v" with constant "0.1_r8" for all layers in "ana_initial.h" (as shown in the figure). However, when checking in the "ocean_his.nc" for the first time (initial time).
1. I found value of "u" are modified with including many 0.0, while "v" has also value of -0.1
2. Although I set value for "ubar" and "vbar" in "ana_initial.h" However it seem to not recognize those value and calculated from "u" and "v". "ubar" which calculated from "u" (constant value of 0.1) has value of 0.0, 0.004 and 0.1, while "vbar" has value same to "v" with value of 0.1 and -0.1
Could you kindly tell me why "u and "v" are re-calculated? and how to let ROMS get directly value of "u", "v", "ubar" and "vbar" from "ana_initial.h" ?
Thank you very much
I have one more question that, for "LAB_CAYON" test case, I set "u" & "v" with constant "0.1_r8" for all layers in "ana_initial.h" (as shown in the figure). However, when checking in the "ocean_his.nc" for the first time (initial time).
1. I found value of "u" are modified with including many 0.0, while "v" has also value of -0.1
2. Although I set value for "ubar" and "vbar" in "ana_initial.h" However it seem to not recognize those value and calculated from "u" and "v". "ubar" which calculated from "u" (constant value of 0.1) has value of 0.0, 0.004 and 0.1, while "vbar" has value same to "v" with value of 0.1 and -0.1
Could you kindly tell me why "u and "v" are re-calculated? and how to let ROMS get directly value of "u", "v", "ubar" and "vbar" from "ana_initial.h" ?
Thank you very much
- Attachments
-
- vu_ana_initial.JPG (18.57 KiB) Viewed 4277 times
Re: How to setup for rotating frame
Before that first history record is written, main3d calls ini_fields which does this:
I can't explain the rest of what you are seeing. However, I believe your v will send fluid towards the middle in a way which will just pile up fluid at the inner wall. Is this what you want?
You can set ubar, vbar however you want, but they will get the vertical integral of u,v.! This routine initializes other time levels for 2D fields. It also !
! couples 3D and 2D momentum equations: it initializes 2D momentum !
! (ubar,vbar) to the vertical integral of initial 3D momentum (u,v). !
I can't explain the rest of what you are seeing. However, I believe your v will send fluid towards the middle in a way which will just pile up fluid at the inner wall. Is this what you want?
Re: How to setup for rotating frame
Many thanks Kate. It makes sense to me.
However, I meet a problem as bellow:
I ran for modified "lab_canyon" with constant bathymetry of 0.025 (m) in 2D.
+ west and east boundary are close (figure c1).
+ South boundary is inflow (Flather) with (vbar=-0.24m/s,ubar=-0.0022m/s, zeta=0.002m), the flow is in counterclockwise,
+ north boundary is outflow (Gra) with (vbar=0m/s,ubar=0m/s, zeta=0m) as shown in figure (c1 & c2 (a)).
+ initial condition: only have value the same to south boundary (figure c2, showing zeta and direction of flow);
+ Coriolis parameter =0 (the frame does not rotate);
+ Lm=150, Mm=350;DT=0.001; NDFAST =1;
After 6 simulated seconds, flow comes to north boundary. However, it seems to quite strange to me that, direction of flow at part (III and IV, in figure c2 (d)) are in clockwise, while direction of flow at part (I and II) are in counterclockwise.
1. It makes me confuse so much since I expected the direction of flow at part (III and IV) should be in counterclockwise
2. why is water level after flow come in almost in minus.
3. if I set zeta at south_boundary is higher (for example zeta = 0.02 m), simulated water level is all in positive, but the direction of flow in part I and II are in clockwise, while direction of flow in part III and IV are in counterclockwise.
I also test for straight channel with similar setup of circle channel (figure R1 (a) to (d)). Its result seems to be fine with no invert flow with inflow.
My purpose is let the flow come from inflow (south boundary) to outflow (north boundary) without invert flow in part III & IV.
I highly appreciate if you could give any advice
Many thanks
However, I meet a problem as bellow:
I ran for modified "lab_canyon" with constant bathymetry of 0.025 (m) in 2D.
+ west and east boundary are close (figure c1).
+ South boundary is inflow (Flather) with (vbar=-0.24m/s,ubar=-0.0022m/s, zeta=0.002m), the flow is in counterclockwise,
+ north boundary is outflow (Gra) with (vbar=0m/s,ubar=0m/s, zeta=0m) as shown in figure (c1 & c2 (a)).
+ initial condition: only have value the same to south boundary (figure c2, showing zeta and direction of flow);
+ Coriolis parameter =0 (the frame does not rotate);
+ Lm=150, Mm=350;DT=0.001; NDFAST =1;
After 6 simulated seconds, flow comes to north boundary. However, it seems to quite strange to me that, direction of flow at part (III and IV, in figure c2 (d)) are in clockwise, while direction of flow at part (I and II) are in counterclockwise.
1. It makes me confuse so much since I expected the direction of flow at part (III and IV) should be in counterclockwise
2. why is water level after flow come in almost in minus.
3. if I set zeta at south_boundary is higher (for example zeta = 0.02 m), simulated water level is all in positive, but the direction of flow in part I and II are in clockwise, while direction of flow in part III and IV are in counterclockwise.
I also test for straight channel with similar setup of circle channel (figure R1 (a) to (d)). Its result seems to be fine with no invert flow with inflow.
My purpose is let the flow come from inflow (south boundary) to outflow (north boundary) without invert flow in part III & IV.
I highly appreciate if you could give any advice
Many thanks
Re: How to setup for rotating frame
Did you write your own plotting code for these? A positive u will be counterclockwise all the way around, but pointing "down" on the left, "up" on the right. Does your plotting code draw vectors that way?
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: How to setup for rotating frame
It is weird that you are not activating periodic boundary conditions in the south and northern boundaries It is the perfect and appropriate case for it because your grid is an annulus You can set the desired flow in the initial condition instead of using Flather boundary conditions. If you have some kind of source forcing, use point sources. Notice that you need to have centripetal acceleration plus Coriolis. See ana_spinning.h.
Re: How to setup for rotating frame
Many thanks "Kate" and "Arango" for your very good comments.
After setting "define" ana_spinning.h and correcting my plotting code, it is fine now.
In addition, original ana_spinning.h lacked a declarations of i and j. Therefore, it gave error during compile. I corrected and upload it here to hope that someone may avoid it
After setting "define" ana_spinning.h and correcting my plotting code, it is fine now.
In addition, original ana_spinning.h lacked a declarations of i and j. Therefore, it gave error during compile. I corrected and upload it here to hope that someone may avoid it
- Attachments
-
- ana_spinning.h
- (5.05 KiB) Downloaded 250 times
Re: How to setup for rotating frame
Question on the float trajectory
I ran for modified "lab_canyon" with constant bathymetry of 0.125 (m) in 2D.
The angular velocity of rotating frame is 2*pi/25. The flow speed = 0.02 m/s[/b] (as shown in the Figure "zeta_and_velcity_vector.jpg".
1. I released float from location "start point" to "end point". I found the float trajectory is really weird at regions where y=0 and x=0 as shown in the figure "float_trajectory.jpg". Could any one give me any comment about that
2. is trajectory of each float in RROMs dx(i)/dt = u(i,t)?
3. I appreciate if anyone can give me a matlab code to plot linestreams in polar coordinate
Many thanks
I ran for modified "lab_canyon" with constant bathymetry of 0.125 (m) in 2D.
The angular velocity of rotating frame is 2*pi/25. The flow speed = 0.02 m/s[/b] (as shown in the Figure "zeta_and_velcity_vector.jpg".
1. I released float from location "start point" to "end point". I found the float trajectory is really weird at regions where y=0 and x=0 as shown in the figure "float_trajectory.jpg". Could any one give me any comment about that
2. is trajectory of each float in RROMs dx(i)/dt = u(i,t)?
3. I appreciate if anyone can give me a matlab code to plot linestreams in polar coordinate
Many thanks
- Attachments
-
- float_trajectory.JPG (42.92 KiB) Viewed 4000 times
-
- lab_canyon.h
- (1003 Bytes) Downloaded 235 times
-
- ana_grid.h
- (22.02 KiB) Downloaded 240 times
-
- ana_spinning.h
- (5.05 KiB) Downloaded 245 times