[FLASH-USERS] setting up a user BC
Klaus Weide
klaus at flash.uchicago.edu
Tue Aug 3 16:44:51 EDT 2010
On Tue, 3 Aug 2010, turcotte wrote:
> Dear all,
>
> I am trying to set-up an inflow entering the computational domain from the lower
> y-axis boundary in 2-D cylindrical coordinates.
> Initially I used the same set-up as the WindTunnel example, modifying
> Grid_applyBCEdge.F90 to have a uniform inflow across the lower boundary.
> For example, the density of the inflowing material is assigned like:
> case (DENS_VAR)
> do i = 1,guard
> dataRow(i)= max(rho_initial,sim_rho_ambient)
> end do
>
> I need to implement a more complex BC however. To do so I define the inflow in
> Grid_bcApplyToRegionSpecialized.F90.
> My first step was to try to reproduce with Grid_bcApplyToRegionSpecialized the
> simple uniform inflow.
> I expected that something like this:
> case (DENS_VAR)
> do i = 1,guard
> regionData(i,:,:,DENS_VAR)= max(rho_initial,sim_rho_ambient)
> end do
> would yield the same inflow as before but it's not the case, the inflow is not
> uniform. There are variations that are aligned with block boundaries.
>
> All else is identical in the two formulations, such as EOS, physical parameters
> of the inflow, etc...
>
> What am I missing?
Sylvain,
Not sure, at a first glance what you are doing should work, but the code
snippets don't give a lot of context.
Some thoughts:
Why do you need a select/case (and, I assume, a surrounding loop over
variables) at all? (Maybe there is a good reason, I am just curious.)
Are you making sure to define regionData for ALL defined variables?
(You should have a 'case default'.)
Are you sure that max(rho_initial,sim_rho_ambient) is constant (at least
for a given time)?
What do the variations look like, what are their relative sizes, and in
which variables?
In the default WindTunnel configuration you would use the
Grid_bcApplyToRegionSpecialized from the "OneRow" directory. To narrow
down the problem, maybe it would be helpful to start with a copy of that
version of Grid_bcApplyToRegionSpecialized.F90, modifying (initially at
least) only one or a few variables in regionData after the calls to
Grid_applyBCEdgeAllUnkVars / Grid_applyBCEdge ?
Klaus
More information about the flash-users
mailing list