OBC for imposed inflow and free outflow

Discussion of how to use ROMS on different regional and basin scale applications.

Moderators: arango, robertson

Post Reply
Message
Author
mariafattorini
Posts: 52
Joined: Tue Mar 03, 2009 2:39 pm
Location: C.N.R. - LaMMA

OBC for imposed inflow and free outflow

#1 Unread post by mariafattorini »

Hello all,

I am trying to create a rectangular channel with walls on the boundaries N and S.
I'd like set an inflow on the W side that come out of the channel through the E side: to do this I have used ana_m3obc.h where I have set the following values:

Code: Select all

#if defined CHANNEL
# ifdef WEST_M3OBC
      IF (WESTERN_EDGE) THEN
        DO k=1,N(ng)
          DO j=JstrR,JendR
            BOUNDARY(ng)%u_west(j,k)=1.0_r8
            BOUNDARY(ng)%v_west(j,k)=0.0_r8
          END DO
        END DO
      END IF
# endif
and I have set the following cpp options about boundary condictions:

Code: Select all

#define NORTHERN_WALL
#define SOUTHERN_WALL

#define WEST_FSRADIATION
#define WEST_M2RADIATION
#define WEST_M3CLAMPED
#define WEST_TGRADIENT

#define EAST_FSRADIATION
#define EAST_M2RADIATION
#define EAST_M3CLAMPED
#define EAST_TCLAMPED
and I have set also ana_initial.h file with the same values set in the ana_m3obc.h file;

but this setting must have wrong something because the result is the velocity field very different than the imposed conditions:
initially 'u' has the imposed initial values but soon it begins to change the scroll ( before 'u' is toward E, then 'u' is toward W, then toward E , and so..)until after 1000 sec about of simulation 'u' is close to 0.Why?

Has someone a suggestion for my cpp options about boundary condiction?

Thank you much,
Maria

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

Re: OBC for imposed inflow and free outflow

#2 Unread post by kate »

Did you set u_east to match u_west?

mariafattorini
Posts: 52
Joined: Tue Mar 03, 2009 2:39 pm
Location: C.N.R. - LaMMA

Re: OBC for imposed inflow and free outflow

#3 Unread post by mariafattorini »

Hello Kate and thank you,

I have tried different setting:
- just inflow on W boundary ( with u_west in ana_m3obc.h);
- either inflow on W and equivalent outflow on E (with u_west and u_east in ana_m3obc.h).

but in either cases the result is not good; the water oscillates between O and E boudaries and then it practically stops.

I think that the cause is the OBC, what do you think?

mariafattorini
Posts: 52
Joined: Tue Mar 03, 2009 2:39 pm
Location: C.N.R. - LaMMA

Re: OBC for imposed inflow and free outflow

#4 Unread post by mariafattorini »

Hello,

I proved that in absent of user definition of boundary conditions, the Roms model runs. I wonder which default boundary conditions are used in the model run.

Moreover how can I set a classical "open boubdary"? I mean, a bc that let the flux to go through the boundary.

Thanks very much for any suggestion,
Maria

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

Re: OBC for imposed inflow and free outflow

#5 Unread post by kate »

We typically don't use clamped on the outflow boundaries or on the mixed in/outflow boundaries. Here is my recipe:

Code: Select all

#ifndef EASTERN_WALL
# define EAST_FSCHAPMAN
# define EAST_M2FLATHER
# ifdef SOLVE3D 
#  define EAST_M3RADIATION
#  define EAST_M3NUDGING
#  define EAST_TRADIATION
#  define EAST_TNUDGING
# endif
#endif
This means you still need to come up with boundary values to be nudging to, however. There are two nudging timescales, for outgoing points and incoming points, of 360 days and 3 days, respectively.

There's also a sponge layer of increase viscosity/diffusivity at the open edges. There are still funky flows there... :P

mariafattorini
Posts: 52
Joined: Tue Mar 03, 2009 2:39 pm
Location: C.N.R. - LaMMA

Re: OBC for imposed inflow and free outflow

#6 Unread post by mariafattorini »

Thanks Kate, your help is very useful for me.

But I don't know which is the meaning of 'nudging time scales' and I am not sure where I have to set them: are they the parameters in the ocean.in called M3NUDG (timescale for attive condition) and OBCFAC (factor between timescales for attive and passive conditions)? or have I to define ana_nudgcoef?

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

Re: OBC for imposed inflow and free outflow

#7 Unread post by kate »

Yes, M3NUDG and friends, plus OBCFAC. So, my case has TNUDG = 360 and OBCFAC = 120.

I do not have ana_nudgcoef. Setting SPONGE means I have to edit ana_hmixcoef, though.

mariafattorini
Posts: 52
Joined: Tue Mar 03, 2009 2:39 pm
Location: C.N.R. - LaMMA

Re: OBC for imposed inflow and free outflow

#8 Unread post by mariafattorini »

Thank you very much Kate; I am beginning to understand how to set the boundary conditions.

I should define a rectangular channel with the following characteristics:

- the North and South boundaries are the lateral walls of the channel;
- the West and East boundaries are open;
- the inflow is equal to 10 m3/s from West to East.

I would like to know how you define cpp options in the header file.
Thank you again, Maria

mariafattorini
Posts: 52
Joined: Tue Mar 03, 2009 2:39 pm
Location: C.N.R. - LaMMA

Re: OBC for imposed inflow and free outflow

#9 Unread post by mariafattorini »

Hello,
to build the example previously posted, I have defined the following obc and cpp to define inflow on West boundary:

SOUTHERN_WALL
NORTHERN_WALL
EAST_FSCHAPMAN - EAST_M2FLATHER - EAST_M3RADIATION - EAST_M3NUDGING
WEST_FSCLAMPED - WEST_M2CLAMPED - WEST_M3CLAMPED

ANA_FSOBC - ANA_M2OBC - ANA_M3OBC

And the example correctly runs, with a right velocity field, but after almost 7 hours (6h 40') the model blows up.Why?

Does someone know the reason?

Many thanks,
Maria

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

Re: OBC for imposed inflow and free outflow

#10 Unread post by kate »

What happens if you try a shorter timestep? Does it blow after the same number of steps, at the same model time, or later?

mariafattorini
Posts: 52
Joined: Tue Mar 03, 2009 2:39 pm
Location: C.N.R. - LaMMA

Re: OBC for imposed inflow and free outflow

#11 Unread post by mariafattorini »

hello kate,

- with dt=1 sec, the model blows up after 6 hours and 9 minutes;
- with dt=0.5 sec, the model blows up after 6 hours and 45 minutes;
- with dt=0.25 sec, the model blows up after 6 hours and 7 minutes;
- with dt=0.1 sec, the model blows up after 6 hours and 27 minutes.

Post Reply