How to setup for rotating frame

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
hoangha
Posts: 8
Joined: Fri Nov 17, 2017 5:02 pm
Location: Dongguk university

How to setup for rotating frame

#1 Unread post by hoangha »

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
Attachments
ratating_frame.JPG
ratating_frame.JPG (27.93 KiB) Viewed 4401 times

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: How to setup for rotating frame

#2 Unread post by kate »

Check the LAB_CANYON test case which is exactly this geometry (with canyon bathymetry).

hoangha
Posts: 8
Joined: Fri Nov 17, 2017 5:02 pm
Location: Dongguk university

Re: How to setup for rotating frame

#3 Unread post by hoangha »

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

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: How to setup for rotating frame

#4 Unread post by kate »

Yes, it gets that from you ocean.in.

hoangha
Posts: 8
Joined: Fri Nov 17, 2017 5:02 pm
Location: Dongguk university

Re: How to setup for rotating frame

#5 Unread post by hoangha »

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
Attachments
vu_ana_initial.JPG
vu_ana_initial.JPG (18.57 KiB) Viewed 4272 times

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: How to setup for rotating frame

#6 Unread post by kate »

Before that first history record is written, main3d calls ini_fields which does this:
! 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). !
You can set ubar, vbar however you want, but they will get the vertical integral of 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?

hoangha
Posts: 8
Joined: Fri Nov 17, 2017 5:02 pm
Location: Dongguk university

Re: How to setup for rotating frame

#7 Unread post by hoangha »

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
Attachments
C1.JPG
C1.JPG (46.24 KiB) Viewed 4217 times
C2_ab.JPG
C2_cd.JPG
R1_ab.JPG
R1_cd.JPG
header.JPG
header.JPG (38.52 KiB) Viewed 4217 times

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: How to setup for rotating frame

#8 Unread post by kate »

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?

User avatar
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

#9 Unread post by arango »

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 :roll: 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.

hoangha
Posts: 8
Joined: Fri Nov 17, 2017 5:02 pm
Location: Dongguk university

Re: How to setup for rotating frame

#10 Unread post by hoangha »

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
Attachments
ana_spinning.h
(5.05 KiB) Downloaded 250 times

hoangha
Posts: 8
Joined: Fri Nov 17, 2017 5:02 pm
Location: Dongguk university

Re: How to setup for rotating frame

#11 Unread post by hoangha »

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
Attachments
zeta_and_velocity_vectors.JPG
float_trajectory.JPG
float_trajectory.JPG (42.92 KiB) Viewed 3995 times
lab_canyon.h
(1003 Bytes) Downloaded 235 times
ana_grid.h
(22.02 KiB) Downloaded 239 times
ana_spinning.h
(5.05 KiB) Downloaded 244 times

Post Reply