Hi George,
> 1) In an earlier patch i forced these variables to be positive using
> fabs(), because a floating point exception would occur when the pow(h1,
> 1.5) function was later called in the code. I see that the latest source
> code has removed/relaxed this constraint. Maybe someone with a better
> understanding of the solver algorithm can advise as to how to properly deal
> with negative flow depths (h values)?
It is clearly inconsistent to have negative water depths. If this
happens, this points to a problem "upstream" of the culvert module and
so should be fixed there rather than "hiding" the problem by taking
the absolute value (which is also clearly inconsistent).
I can't remember precisely but this may be what I have done in the current code.
Do you have an example where you get negative values (ans thus
crashes) with the current code?
> 2) in river.h the gfssourcepipe structure defines h as the flow depth. In
> gfsriver the variable p typically represents the flow depth, while h
> represents the flow head (=bed elevation+flow depth). There therefore
> appears to be a variable naming clash. In english hydraulic texts y
> traditionally represents flow depth, h head, z bed elevation, p pressure
> etc. Should the gfssourcepipe structure in gfsriver.h not refer to p (flow
> depth as defined in gerris)?
Variable names are a matter of convention and (unfortunately?)
conventions vary. I believe the variable names in "SourcePipe" and the
culvert module follow those used by Boyd, 1984, which are different
from the "english hydraulic texts" conventions you mention, and also
different from the conventions in Gerris...
cheers
Stephane
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612
_______________________________________________
Gfs-devel mailing list
Gfs-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gfs-devel