Dear Alex,
please find my response below
Date: Wed, 25 Feb 2015 08:58:23 +0100
From: [email protected]
To: [email protected];
Subject: Re: Dumux Digest, Vol 49, Issue 10
Dear Sandeep,
I have a
3d, cube domain of 1mx1mx1m, gridded with 100
cells in each direction.
I tried to setup a Dirichlet
boundary on a circular area of the XY face, The circle centre
has X and Y values of
0.5
and radius of 0.5m.
(Below is the code for boundary setup).
So, at the cells, where the
circumference of the circle passes, there might be two types
of boundary condition at
a single cell.
I think this may be the
problem ?
I am not quite sure I understand your code corrrectly. But I am
wondering why you are using for-loops (comparing int to Scalar)
within your boundaryTypesAtPos() function. If you want to assign a
Dirchilet boundary condition to a circular area within one of your
cube faces it should be sufficient to have a condition to see
whether you are on the correct cube face (as you have done
correctly) and another condition to make sure your integration
point (ip, the point at globalPos) is within your circle.
I used the for loops to specify the coordinate (X,Y)
values for the center of the circle. With the condition
"if
(((globalPos[0]*globalPos[0])+
(globalPos[1]*globalPos[1]))==(r_*r_))" i tried to ensure that my integration
point (ip, the point at globalPos) is within a circle.
Without the for loops, the circle can be inscribed anywhere on the XY face,
wherever the condition fulfils.
The way you assign it you would only allow the ips directly on
your circumference to be Dirichlet and as far as I understand you
want the whole circle area to be a Dirichlet BC? Probably at the
moment none of your boundary faces are assigned with a Dirichlet
BC.
I have also tried with "if
(((globalPos[0]*globalPos[0])+
(globalPos[1]*globalPos[1]))<=(r_*r_))" but the result is same. Yes, you are
right
i want the whole circular area as my boundary and i
think even if, my condition is
"if
(((globalPos[0]*globalPos[0])+
(globalPos[1]*globalPos[1]))==(r_*r_))" then it applies to the circumferences
(as you said) of all
circles that can exist within my circle of given radius
(concentric circles), thus applies to the area within the circle.
(Please correct me if wrong)
For some reason, i am not able to
download the file from listserver,
Would you please, send it
again and cc to my email address.
I put you on cc.
Thanks, i would see if this can be used to create a
complete cylindrical domain rather than a piece of cake.
Finally, I
need to setup a time dependent boundary, where the Dirichlet boundary
will
move from a sector, a piece
of cake to the next piece, along a circle, depending on the
time.
So, i would need to have a
circular domain as well ? Or can it be done in a cube grid ?
If you assign this kind of a boundary condition to a cube
grid you will make some error depending on your refinement.
So, it might be better to have a cylindrical domain ?
Best regards
Sandeep
On 02/24/2015 01:13 PM, Sandeep Chakraborty wrote:
Dear Alex,
>
> > The convergence error was "residual_[10201][0] is not
finite"
> > (attached is a screen shot).
> It is hard to tell what the problem could be. Maybe the
boundary
> conditions are not set correctly.
>
> > So, is this due to describing a circular boundary over
a Cartesian grid ?
> Are you really having a circular domain 2d or 3d? Can you
describe that
in more detail?
I have a 3d, cube
domain of 1mx1mx1m, gridded with 100 cells in each direction.
I tried to setup a Dirichlet
boundary on a circular area of the XY face, The circle centre
has X and Y values of
0.5
and radius of 0.5m.
(Below is the code for boundary setup).
So, at the cells, where the
circumference of the circle passes, there might be two types
of boundary condition at
a single cell.
I think this may be the
problem ?
void
boundaryTypesAtPos(BoundaryTypes &values,
const GlobalPosition &globalPos) const
{
values.setAllNeumann();
Scalar right =
this->bBoxMax()[0];
Scalar top =
this->bBoxMax()[1];
Scalar bottom =
this->bBoxMax()[2];
Scalar front =
this->bBoxMin()[2];
Scalar cx_=0.5;
Scalar cy_=0.5;
Scalar r_=0.5;
if (globalPos[2]
< front +eps_)
{
for (int i = cx_
; i <=r_+globalPos[0] ; i++)
{
for (int j = cy_
; j<=r_+globalPos[1] ; j++)
if
(((globalPos[0]*globalPos[0])+(globalPos[1]*globalPos[1]))==(r_*r_))
values.setAllDirichlet();
}
}
#if !ISOTHERMAL
values.setDirichlet(temperatureIdx, energyEqIdx);
#endif
}
> > Can one describe polar coordinate (converted to x and
y values) on a
> > Cartesian grid in Dumux
> It has often been practiced to read in x,y corrdinates of a
radially
> symmetric grid (piece of cake). For the boundary conditions
you usually
> get a global position in x,y and can then transform these
coordinates
> into polar coordinates (r,alpha) to set the proper boundary
conditions.
> There are no specific functions in dumux for this
transformation, but
> you could easily implement them into your problem file.
>
> > if there is polar grid creator in Dumux ?
> There is a Matlab script you could use for setting up 3d
radially
> symmetric grids (piece of cake) in cartesian coordinates
which creates a
> dgf file (see attached files).
For some reason, i am not able to
download the file from listserver,
Would you please, send it
again and cc to my email address.
Finally, I need to setup a time dependent boundary, where the
Dirichlet boundary will
move from a sector, a piece
of cake to the next piece, along a circle, depending on the
time.
So, i would need to have a
circular domain as well ? Or can it be done in a cube grid ?
Thanks and Best Regards
Sandeep
> From: [email protected]
> Subject: Dumux Digest, Vol 49, Issue 10
> To: [email protected]
> Date: Tue, 24 Feb 2015 12:00:07 +0100
>
> Send Dumux mailing list submissions to
> [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
> or, via email, send a message with subject or body 'help'
to
> [email protected]
>
> You can reach the person managing the list at
> [email protected]
>
> When replying, please edit your Subject line so it is
more specific
> than "Re: Contents of Dumux digest..."
>
>
> Today's Topics:
>
> 1. Re: Describing radial boundary on a Cartesian grid
> (Alexander Kissinger)
>
>
>
----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 23 Feb 2015 15:22:01 +0100
> From: Alexander Kissinger
<[email protected]>
> To: DuMuX User Forum
<[email protected]>
> Subject: Re: [DuMuX] Describing radial boundary on a
Cartesian grid
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset="windows-1252";
Format="flowed"
>
> Dear Sandeep,
>
> > The convergence error was "residual_[10201][0] is
not finite"
> > (attached is a screen shot).
> It is hard to tell what the problem could be. Maybe the
boundary
> conditions are not set correctly.
>
> > So, is this due to describing a circular boundary
over a Cartesian grid ?
> Are you really having a circular domain 2d or 3d? Can you
describe that
> in more detail?
>
> > Can one describe polar coordinate (converted to x
and y values) on a
> > Cartesian grid in Dumux
> It has often been practiced to read in x,y corrdinates of
a radially
> symmetric grid (piece of cake). For the boundary
conditions you usually
> get a global position in x,y and can then transform these
coordinates
> into polar coordinates (r,alpha) to set the proper
boundary conditions.
> There are no specific functions in dumux for this
transformation, but
> you could easily implement them into your problem file.
>
> > if there is polar grid creator in Dumux ?
> There is a Matlab script you could use for setting up 3d
radially
> symmetric grids (piece of cake) in cartesian coordinates
which creates a
> dgf file (see attached files).
>
> best regards
> Alex
>
>
> On 02/23/2015 12:55 PM, Sandeep Chakraborty wrote:
> > Dear All,
> >
> > Greetings to everyone.
> > I was trying to describe a circular boundary over a
fine Cartesian
> > grid, in the 2p2cni problem.
> > The problem didn't converge and more interestingly
with different
> > timesteps the convergence relative error was always
same.
> > The convergence error was "residual_[10201][0] is
not finite"
> > (attached is a screen shot).
> >
> > So, is this due to describing a circular boundary
over a Cartesian grid ?
> > Can one describe polar coordinate (converted to x
and y values) on a
> > Cartesian grid in Dumux and if there is polar grid
creator in Dumux ?
> >
> > I appreciate your advice in advance.
> > Thanks and Best regards
> > Sandeep
> >
> >
> > _______________________________________________
> > Dumux mailing list
> > [email protected]
> >
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
>
>
> --
> Alexander Kissinger
> Institut f?r Wasser- und Umweltsystemmodellierung
> Lehrstuhl f?r Hydromechanik und Hydrosystemmodellierung
> Pfaffenwaldring 61
> D-70569 Stuttgart
>
> Telefon: +49 (0) 711 685-64729
> E-Mail: [email protected]
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
<http://listserv.uni-stuttgart.de/pipermail/dumux/attachments/20150223/055e5804/attachment-0001.html>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: pieceofcakegridcreator.zip
> Type: application/zip
> Size: 3027 bytes
> Desc: not available
> URL:
<http://listserv.uni-stuttgart.de/pipermail/dumux/attachments/20150223/055e5804/attachment-0001.zip>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Dumux mailing list
> [email protected]
> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
>
>
> ------------------------------
>
> End of Dumux Digest, Vol 49, Issue 10
> *************************************
--
Alexander Kissinger
Institut für Wasser- und Umweltsystemmodellierung
Lehrstuhl für Hydromechanik und Hydrosystemmodellierung
Pfaffenwaldring 61
D-70569 Stuttgart
Telefon: +49 (0) 711 685-64729
E-Mail: [email protected]
_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux