[Gfs-devel] scaling issue with GfsVariablePoisson

20 views
Skip to first unread message

Vladimir Kolobov

unread,
Oct 30, 2014, 12:28:43 PM10/30/14
to gfs-...@lists.sourceforge.net
Dear Gerris Developers,

There is an issue with GfsVariablePoisson with non-unity domain scaling.

If L is set to something different from 1 in PhysicalParams, the
solutions of the Poisson equations in the attached script differ by a
factor of L*L.

This is because gfs_function_value in calculating RHS is used in
GfsVariablePoisson which returns adimensional_value.

If one sets

VariablePoisson { istep = 1 } Phi Div*0.1*0.1

the solutions coincide.

This just a note to those using GfsVariablePoisson that the divergence
(RHS of the Poisson equation) needs to be scaled with L*L.

Cheers,

Vladimir

====================================

1 0 GfsPoisson GfsBox GfsGEdge {} {
Time { iend = 10 }

Refine 5

PhysicalParams { L = 0.1 }

Init {} {
Div = {
return 1.;
}
}

VariablePoisson { istep = 1 } Phi Div

OutputSimulation { start = end } end-SOLVER.gfs
}
GfsBox {
left = Boundary { BcDirichlet P 0. BcDirichlet Phi 0. }
right = Boundary { BcDirichlet P 0. BcDirichlet Phi 0. }
top = Boundary { BcNeumann P 0. BcNeumann Phi 0. }
bottom = Boundary { BcNeumann P 0. BcNeumann Phi 0. }
}

------------------------------------------------------------------------------
_______________________________________________
Gfs-devel mailing list
Gfs-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gfs-devel

Vladimir Kolobov

unread,
Oct 30, 2014, 8:24:25 PM10/30/14
to gfs-...@lists.sourceforge.net
a fix has been found:

in variable_poisson_event, we need to reduce the units of the RHS (aka
div) by 2 with the reference to the variable to be solved for:

gfs_function_set_units (p.f, v->units - 2.);

The new call comes between

DivData p = { GFS_VARIABLE_FUNCTION (event)->f, div };

--> new call to gfs_function_set_units (p.f, v->units - 2.);

and

gfs_domain_traverse_leaves (domain, (FttCellTraverseFunc)
rescale_div, &p);

Cheers,

Vladimir.
Reply all
Reply to author
Forward
0 new messages