[firedrake] Solve a Variational problem in a part of the domain

Colin Cotter colin.cotter at imperial.ac.uk
Fri Aug 14 15:07:03 BST 2015


Hi Anna,
  Ah, I see. So you "snap" the Heaviside function to the nearest gridpoint.

all the best
--cjc

On 14 August 2015 at 11:55, Anna Kalogirou <a.kalogirou at leeds.ac.uk> wrote:

> Hi,
>
> I was planning to define the heavyside function as a DG0 function.
>
> Any ideas about solving equation (1b), which contains a time-update for
> both a function and a scalar?
>
> Thanks,
> Anna.
>
>
>
> On 13/08/15 18:35, Colin Cotter wrote:
>
> Hi Anna,
>   It *was* interesting!
>
> How do you intend to compute the integrals against the Heaviside function?
> The Heaviside function is non-polynomial so can't be computed exactly by
> quadrature.
>
> You are right that our standard setup can't cope with this situation
> currently. What we really need are function spaces that are defined to be
> constant in an entire column. We should try to sketch out with David and
> Lawrence what might be required in the infrastructure to support this. I
> can see it being useful for many other free surface type problems as well.
>
> all the best
> --Colin
>
> On 13 August 2015 at 15:36, Anna Kalogirou <a.kalogirou at leeds.ac.uk>
> wrote:
>
>> Hi Colin,
>>
>> I attached a two-page document, where the system of equations I was
>> talking about in the previous email is (1a)-(1e). I am puzzled with
>> equation (1b) really. I can also eliminate (1b) & (1d) and solve for the
>> remaining (1a), (1c) & (1f), but in this case I still don't know how to
>> deal with (1f) since there is an integral into the integral, which contains
>> the unknown function lambda^{n+1/2}.
>>
>> Thanks, Anna.
>>
>>
>> On 13/08/15 13:47, Colin Cotter wrote:
>>
>> Hi Anna,
>>    Sounds interesting. Please could you provide a bit more detail?
>>
>> all the best
>> --Colin
>>
>> On 13 August 2015 at 12:09, Anna Kalogirou <a.kalogirou at leeds.ac.uk>
>> wrote:
>>
>>> Dear all,
>>>
>>> I have a system of equations to solve, which involves three space
>>> dependent functions phi, eta, lambda and two constants/scalars Z, W.
>>> These need to be solved simultaneously because all the equations involve
>>> at least 2 unknowns.
>>>
>>> How do I solve that, considering that one of the scalar equations
>>> includes a spacial integral of one of the (still unknown) functions? Is
>>> it best to define the scalars as Constants?
>>>
>>> This problem goes away when I write down the system in a standard FEM
>>> formulation, introducing the mass matrix etc. In this case, it is clear
>>> that I could solve for that function and then consecutively solve each
>>> of the remaining 4 equations. It is not that obvious how I can do that
>>> using Firedrake, that is why I thought I would have to solve
>>> simultaneously, but then I have the problem described above.
>>>
>>> Regards,
>>>
>>> Anna.
>>>
>>>
>>> On 06/08/15 11:04, Lawrence Mitchell wrote:
>>> > -----BEGIN PGP SIGNED MESSAGE-----
>>> > Hash: SHA1
>>> >
>>> > Hi Anna,
>>> >
>>> > On 06/08/15 10:37, Anna Kalogirou wrote:
>>> >> Dear all,
>>> >>
>>> >> I have a rather simple question but I would like to get some
>>> >> feedback from someone in the Firedrake team.
>>> >>
>>> >> I am now working on the problem which includes solving a
>>> >> variational problem in a part of the domain only (a water wave
>>> >> problem which includes a floating body).
>>> >>
>>> >> I can think of a couple of possible solutions on how to solve this:
>>> >>   1. Define two domains and solve the problem separately in each
>>> >> domain. However, I will have to deal with nonzero boundary
>>> >> conditions on the common boundary.
>>> >>
>>> >> 2. I prefer solving the problem in the whole domain, since most of
>>> >> the equations/functions are valid everywhere. Then I can define a
>>> >> Heavyside step function which will be 0 in one part and 1 in the
>>> >> part of the domain I am interested in (under the floating body). I
>>> >> will essentially write down a variational problem valid everywhere,
>>> >> but will actually be zero in a part of the domain.
>>> >>
>>> >> Is the 2nd step a good approach? The question essentially is how
>>> >> to split a mass matrix M_kl which is defined everywhere, and solve
>>> >> and integral form in a part of the domain only.
>>> > I think step two is a fine approach.  However, note the following
>>> > issues at present.  The way you would have to do this currently is as
>>> > follows:
>>> >
>>> > Define a DG0 field to hold your indicator function
>>> >
>>> > indicator = Function(DG0)
>>> >
>>> > # Set it to 1 in the appropriate part of the domain
>>> > indicator.interpolate(...)
>>> >
>>> > # Now use this extra field everywhere when defining your variational
>>> > # problem.
>>> >
>>> > However, all your integrals are still over the whole domain, you just
>>> > pick up lots of zeros.
>>> >
>>> > Steadily climbing our todo list (and at an increasing pace, I feel),
>>> > is the ability to define proper sub domains in a mesh, and then be
>>> > able to perform integrals over them.  Until that time, I think
>>> > approach 2 is somewhat easier to do than approach 1.
>>> >
>>> > Cheers,
>>> >
>>> > LAwrence
>>> > -----BEGIN PGP SIGNATURE-----
>>> > Version: GnuPG v1
>>> >
>>> > iQEcBAEBAgAGBQJVwzElAAoJECOc1kQ8PEYvGswIAN+Mr6hD+U0NmsnZAGminaq+
>>> > j/SqmI+o7GlbXRSgPqEfrpyWwFiiFVN6DnPmTboRooZr3h93ZhGDhECQ/O12XKA/
>>> > 00yNuCiDn4YBaXJamWBM6u8ILdZYGMyVNTG1JOaZZIMBoiIkrTyYpXatGApcE4sD
>>> > 4T+DoAYSUEY7u6MV4eJmRc1lzZEd8Rw43YP+Viy0itCs2jKV+HsDpvpvu1DU/FSQ
>>> > zMeE/cRR8It6aImk1L3OON8Zo2ZB0HNirK6YuD3sMkIoqLEYANnNl8qaeU3LL227
>>> > 3TL4ddkALXQLGaYGo5ETgtMKI6afNDIsfjwGUcVRhTTxHM3GKOMQgWV6miNtgv4=
>>> > =wE25
>>> > -----END PGP SIGNATURE-----
>>> >
>>> > _______________________________________________
>>> > firedrake mailing list
>>> > firedrake at imperial.ac.uk
>>> > https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>
>>> --
>>>
>>>   Dr Anna Kalogirou
>>>   Research Fellow
>>>   School of Mathematics
>>>   University of Leeds
>>>
>>>   http://www1.maths.leeds.ac.uk/~matak/
>>>
>>>
>>> _______________________________________________
>>> firedrake mailing list
>>> firedrake at imperial.ac.uk
>>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>>
>>
>>
>>
>> --
>> http://www.imperial.ac.uk/people/colin.cotter
>>
>> www.cambridge.org/9781107663916
>>
>>
>>
>>
>> _______________________________________________
>> firedrake mailing listfiredrake at imperial.ac.ukhttps://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>
>>
>> --
>>
>>  Dr Anna Kalogirou
>>  Research Fellow
>>  School of Mathematics
>>  University of Leeds
>>
>>  http://www1.maths.leeds.ac.uk/~matak/
>>
>>
>
>
> --
> http://www.imperial.ac.uk/people/colin.cotter
>
> www.cambridge.org/9781107663916
>
>
>
>
> _______________________________________________
> firedrake mailing listfiredrake at imperial.ac.ukhttps://mailman.ic.ac.uk/mailman/listinfo/firedrake
>
>


-- 
http://www.imperial.ac.uk/people/colin.cotter

www.cambridge.org/9781107663916
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the firedrake mailing list