[Hedge] initialisation, angles, interpolation
Islam El Salawi
islamelsalawi at gmx.de
Thu Apr 7 00:39:51 PDT 2011
Hi Andreas and everybody,
I want to do something like this:
In the inlet there should be a flow angle 30 deg, for example. The angle in
the domain should be 0, and in the outflow -60.
So, as you told me, I assign three classes of UniformMachFlow for the two
BC's and the domain
inflow=UniformMachFlow(30 deg)
outflow=UniformMachFlow(-60 deg)
domain=UniformMachFlow(0 deg)
Now to calculate the right hand side I need the variable fields, which is
set to
fields="".volume_interpolant(0,discr)
So what shall I put in the quotes. I guess it should be filled with
"domain". But what about the BC inflow and outflow. Are these assigned to
"fields" as well? When I choose fields=domain.volume_interpolant(0,discr)
and take a look at the output at the first timestep, the vectors just show
the direction for the angle being 0, the domain. No inflow and outflow
angles.
So is this problem to be fixed by the ifpositive() class? Something like
fields=ifpositive(x at inflow, then inflow.volume_interpolant, else
domain.volume_interpolant)?
I'm sorry, if I was not precise enough with my request, I hope this makes
things clearer.
Thanks,
Islam
>
> -------- Original-Nachricht --------
> Datum: Wed, 06 Apr 2011 14:10:38 -0400
> Von: Andreas Kloeckner <lists at informa.tiker.net>
> An: Islam El Salawi <islamelsalawi at gmx.de>, hedge at tiker.net
> Betreff: Re: [Hedge] initialisation, angles, interpolation
>
> On Wed, 06 Apr 2011 16:45:37 +0200, "Islam El Salawi"
> <islamelsalawi at gmx.de> wrote:
> > -------- Original-Nachricht --------
> > Datum: Wed, 06 Apr 2011 16:44:09 +0200
> > Von: "Islam El Salawi" <islamelsalawi at gmx.de>
> > An: Andreas Kloeckner <lists at informa.tiker.net>
> > Betreff: Re: [Hedge] initialisation, angles, interpolation
> >
> > Hi Andreas,
> >
> > thanks for your fast response. I have assigned three different
> > UniformMachFlow classes with different data for direction and mach
> number:
> >
> > var1=UniformMachFlow(data1)
> > var2=UniformMachFlow(data2)
> > var3=UniformMachFlow(data3)
> >
> > But how can I feed the variable "fields" with these three initial
> datasets.
> > This "fields" variable appears in the shearflow.py script, for example,
> and
> > it is assigned as follows:
> >
> > fields=var.volume_interpolant(0, discr)
> >
> > with "var" being of class UniformMachFlow. I can set "fields" for one
> > "var", but how about two or more?
>
> I thought you had said you just wanted one BC (say the inflow) to be
> different? Now you seem to be talking about different fields within the
> volume.
>
> In any case, to realize something like that, see for example this here:
>
>
> http://git.tiker.net/hedge.git/blob/refs/heads/staging:/examples/gas_dynamics/lbm-simple.py#l62
>
> The key point is 'from pymbolic.primitives import IfPositive'. This
> allows you to do if/then-style conditionals.
>
> HTH,
> Andreas
>
>
--
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tiker.net/pipermail/hedge/attachments/20110407/87f72375/attachment.html>
More information about the Hedge
mailing list