Thomas Ward
2008-05-15 20:03:07 UTC
First of all, thanks to the ff3d team for making ff3d available, I found
the approach very natural and the documentation excellent.
I am using ff3d to solve a potential flow problem for forced periodic
oscillation of fluid in a tank with gravity free surface waves.
The solution using "strong" form appears to work, see below.
vertex a = (0,0,0);
vertex b = (10,10,10);
vector n = (25,50,10);
mesh M = structured(n,a,b);
double f=1.4;
function alpha=f*f/9.81;
solve(phi) in M
{
pde(phi)
-div(grad(phi))=0;
dnu(phi)=f on M xmin; //forced velocity = - omega cos(wt)
dnu(phi)=-f on M xmax;
dnu(phi)=0 on M ymin;// normal velocity zero on y walls
dnu(phi)=0 on M ymax;
dnu(phi)=0 on M zmin; //normal velocity zero on bottom
alpha*phi +dnu(phi) = 0 on M zmax; //free surface condition
};
save(medit,"tank1-phi",M);
save(medit,"tank-phi",phi,M);
I then tried to solve the same problem using the "weak" form
solve(phi) in M
{
test(w)
int (dx(w)*dx(phi)+dy(w)*dy(phi)+dz(w)*dz(phi))
// int(grad(phi)*grad(w))
+int[M xmin](w*dx(phi) +w*f)
+int[M xmax](w*dx(phi)-w*f)
+int[M ymin](w*dy(phi))
+int[M ymax](w*dy(phi))
+int[M zmin](w*dz(phi))
+int[M zmax](w*dz(phi)+w*alpha*phi)
=0;
};
but I get the following error
=========================
== Text mode execution ==
=========================
FreeFEM3D computing thread: started
Parsing data
VariationalFormulaExpression.cpp:73:
unexpected operator type
UNEXPECTED ERROR: this should not occure, please report it
BUG REPORT: Please send bug reports to:
ff3d-***@nongnu.org or ***@ann.jussieu.fr
or better, use the Bug Tracking System:
http://savannah.nongnu.org/bugs/?group=ff3d
any ideas?
PS
One small documentation suggestion; the method of defining Robin type
boundary conditions be added to the documentation or README file.
Tom
the approach very natural and the documentation excellent.
I am using ff3d to solve a potential flow problem for forced periodic
oscillation of fluid in a tank with gravity free surface waves.
The solution using "strong" form appears to work, see below.
vertex a = (0,0,0);
vertex b = (10,10,10);
vector n = (25,50,10);
mesh M = structured(n,a,b);
double f=1.4;
function alpha=f*f/9.81;
solve(phi) in M
{
pde(phi)
-div(grad(phi))=0;
dnu(phi)=f on M xmin; //forced velocity = - omega cos(wt)
dnu(phi)=-f on M xmax;
dnu(phi)=0 on M ymin;// normal velocity zero on y walls
dnu(phi)=0 on M ymax;
dnu(phi)=0 on M zmin; //normal velocity zero on bottom
alpha*phi +dnu(phi) = 0 on M zmax; //free surface condition
};
save(medit,"tank1-phi",M);
save(medit,"tank-phi",phi,M);
I then tried to solve the same problem using the "weak" form
solve(phi) in M
{
test(w)
int (dx(w)*dx(phi)+dy(w)*dy(phi)+dz(w)*dz(phi))
// int(grad(phi)*grad(w))
+int[M xmin](w*dx(phi) +w*f)
+int[M xmax](w*dx(phi)-w*f)
+int[M ymin](w*dy(phi))
+int[M ymax](w*dy(phi))
+int[M zmin](w*dz(phi))
+int[M zmax](w*dz(phi)+w*alpha*phi)
=0;
};
but I get the following error
=========================
== Text mode execution ==
=========================
FreeFEM3D computing thread: started
Parsing data
VariationalFormulaExpression.cpp:73:
unexpected operator type
UNEXPECTED ERROR: this should not occure, please report it
BUG REPORT: Please send bug reports to:
ff3d-***@nongnu.org or ***@ann.jussieu.fr
or better, use the Bug Tracking System:
http://savannah.nongnu.org/bugs/?group=ff3d
any ideas?
PS
One small documentation suggestion; the method of defining Robin type
boundary conditions be added to the documentation or README file.
Tom