Re: [Gfs-devel] scaling issue with GfsVariablePoisson
Brought to you by:
popinet
From: Vladimir K. <vi...@cf...> - 2014-10-31 00:24:23
|
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. On 10/30/2014 11:13 AM, Vladimir Kolobov wrote: > 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...@li... > https://lists.sourceforge.net/lists/listinfo/gfs-devel > > |