[Gfs-devel] source terms for VariableVOFconcentration

65 views
Skip to first unread message

Jose M. López-Herrera Sánchez

unread,
Oct 23, 2012, 7:03:48 AM10/23/12
to GFS developper discussion list
Hi Stephane,

I have detected problems with conservation of tracers when using source terms with VariableVOFConcentration. I think I have identified the origin: It is because the VariableVOFConcentration is defined relative to the volume occupied by the associated TracerVOF instead of the spatial volume as assumed by the schemes.  To correct this issue I have thought that we could reformulate the VOFconcentration to spatial average at some point of the code, 

par->v = par->v * VOF fraction

to use the schemes you implemented which are designed for tracers per unit of spatial volume, i.e. ,

and then back to the original concentration per unit of VOF tracer

par->v = VOF fraction > 0. ? par->v / VOF fraction : GFS_NODATA

I think it implies in most cases minimal corrections. (attached it is the patch I propose and a modification of the cylinder test case).
The patch is intended to solve explicit  sources (simulation files with solids has to be more throughly checked).

For implicit schemes (SourceDiffusion)  the problem is no yet solved. Apparently it would be not very complicated but I have not been able to make it work. Sure, I am lacking something.

Cheers

Jose
SourceDiffusionExplicit.patch

Jose M. López-Herrera Sánchez

unread,
Oct 23, 2012, 10:23:22 AM10/23/12
to GFS developper discussion list
Stephane,

I apologize !!

In the patch I sent you a couple of lines should not be included in the patch (specifically those of timestep.c 968)  !!!  I am sending you the amended patch.

Please, forgive me for the inconveniences it has caused you !

José


2012/10/23 Jose M. López-Herrera Sánchez <jose.lopez...@gmail.com>
SourceDiffusionExplicit.patch

Jose M. López-Herrera Sánchez

unread,
Oct 24, 2012, 7:02:23 AM10/24/12
to GFS developper discussion list
Hi all,

Finally, I have managed to make work SourceDiffussion with VariableVOFConcentration. Attached is the patch.It is included a new test case which is derived from the existing "diffussion".

cheers
implicitdiffusion.patch

Stephane Popinet

unread,
Nov 13, 2012, 6:55:44 PM11/13/12
to GFS developper discussion list
Hi Jose,

Thanks for the patch (I am looking at SourceDiffusionExplicit.patch
first). It looks good but there are a few changes I think would make
things clearer. I think that to be consistent with the other tracers
VariableVOFConcentration should be defined as a concentration per unit
of the total volume. This means that the conversion back and forth
between concentration per unit of "VOF volume" to total volume should
be done before/after advection of VariableVOFConcentration within
vof.c, rather than within timestep.c as in your patch. This also means
updating the test cases. Do you agree?

cheers

Stephane

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Gfs-devel mailing list
Gfs-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gfs-devel

Jose M. López-Herrera Sánchez

unread,
Nov 14, 2012, 4:17:36 AM11/14/12
to GFS developper discussion list
Hi Stephane,

 I think that to be consistent with the other tracers
VariableVOFConcentration should be defined as a concentration per unit
of the total volume. This means that the conversion back and forth
between concentration per unit of "VOF volume" to total volume should
be done before/after advection of VariableVOFConcentration within
vof.c, rather than within timestep.c as in your patch. This also means
updating the test cases. Do you agree?


I fully agree. Your solution is cleaner, simpler and self-contained. So dimiss the patches I sent you, I am going to prepare a new one in short with the approach you propose.  

cheers

Jose

Jose M. López-Herrera Sánchez

unread,
Nov 14, 2012, 8:49:40 AM11/14/12
to GFS developper discussion list
Hi Stephane,

An additional question arise with concentrations per unit of cell volume, Shall we keep NODATA value for the concentrations C or we set directly 0. for cells with T=0. ? If we set 0. things would be easier for Diffusion coefficients that were C dependent. 

Cheers

Jose

2012/11/14 Jose M. López-Herrera Sánchez <jose.lopez...@gmail.com>

Stephane Popinet

unread,
Nov 14, 2012, 3:41:27 PM11/14/12
to GFS developper discussion list
Hi Jose,

> An additional question arise with concentrations per unit of cell volume,
> Shall we keep NODATA value for the concentrations C or we set directly 0.
> for cells with T=0. ? If we set 0. things would be easier for Diffusion
> coefficients that were C dependent.

Yes, I guess that makes sense although you may want to be careful as
this could lead to non-zero diffusion fluxes for C at faces between
cells with T = 0 and T != 0.

Jose M. López-Herrera Sánchez

unread,
Nov 15, 2012, 7:32:49 AM11/15/12
to GFS developper discussion list
Hi Stephane,

I am sending you the following patches: 

Thu Nov 15 11:19:18 CET 2012  jose.lopez...@gmail.com
  * VariableVOFConcentration is defined now as per cell volume

Self-explanatory.

Thu Nov 15 11:27:29 CET 2012  jose.lopez...@gmail.com
  * concentration test is adapted to the new definition of VariableVOFConcentration

This patch includes the modification of the existing test shear/concentration. I have had
to modify slightly the error references.

Thu Nov 15 12:49:25 CET 2012  jose.lopez...@gmail.com
  * cylinder test updated

I have included a VariableVOFConcentration to the  cylinder  electrohydrodynamic test to illustrate how to use it together with a DiffusionExplicit and to show that the total charge is preserved. 
 
 Thu Nov 15 12:52:56 CET 2012  jose.lopez...@gmail.com
  * new test case to check diffusion applied to VariableVOFConcentration

This is a new test case that illustrates and compares explicit and diffusion explicit when applied to GfsVariableVOFConcentration and, besides, to a standard VariableTracer.

About your warning

Yes, I guess that makes sense although you may want to be careful as
this could lead to non-zero diffusion fluxes for C at faces between
cells with T = 0 and T != 0.
It can be solved or:

a) via the diffusion coefficient. (see the test cases I am sending: cylinder and diffusion/concentration) 

or
b) by modifying the code so that in case of faces shared by cells with T=0 and T != 0 the diffusion coefficient were zero.

I prefer the second option (b) since the first although conservative I think it could penalize excesively the diffusion values in the vicinity of the interface compared to bulk values. I have already prepared a patch for the second for (b) option that I will send you in short (I need to check it a little bit more before to publish it).  

Cheers

Jose


VOFConcentration.patch

Stephane Popinet

unread,
Nov 25, 2012, 6:22:35 PM11/25/12
to GFS developper discussion list
Hi Jose,

Thanks a lot for the patches, however when I try to apply them I get:

% darcs apply /tmp/VOFConcentration.patch

darcs failed: Patch bundle failed hash!
This probably means that the patch has been corrupted by a mailer.
The most likely culprit is CRLF newlines.

Could you please resend it?

Jose M. López-Herrera Sánchez

unread,
Nov 26, 2012, 4:51:28 AM11/26/12
to GFS developper discussion list
Hi Stephane,

Now should work. (I have tested the patch in other PC).

Cheers

Jose

PS: I am sending too the patch which makes face_diffusion values equal to 0. for face bounding to cells with T=0 in case of variableVOFConcentration. Just in case you wish to add it to the stable version. 
VOFConcentration.patch
facediffusion.patch

Stephane Popinet

unread,
Jan 8, 2013, 7:50:58 PM1/8/13
to GFS developper discussion list
Hi Jose,

Happy new year and thanks for the patches. The VOFConcentration patch
looks good. I have just made a few cosmetic changes. The patchset will
be in the next release.

I don't really like the facediffusion patch because it is just too
specific and adds an ugly conditional in the general diffusion
objects. Any other way you can think of? e.g. by overloading object
methods?

Could you please make sure in future that your "author" field in darcs
is formatted as:
Jose M. López-Herrera Sánchez <jose.lopez...@gmail.com>

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

Jose M. López-Herrera Sánchez

unread,
Jan 9, 2013, 4:35:49 AM1/9/13
to GFS developper discussion list
Hi Stephane,

Happy new year and thanks for the patches. The VOFConcentration patch
looks good. I have just made a few cosmetic changes. The patchset will
be in the next release.

Ok, fine! 

I don't really like the facediffusion patch because it is just too
specific and adds an ugly conditional in the general diffusion
objects. Any other way you can think of? e.g. by overloading object
methods?
 
What about to add a new parameter (named for example barrier) to the GfsDiffusion object that would work as a weighting function i. e.

GfsVariableTracerVOF T
....
SourceDiffusion Tracer K  {beta = 1 barrier = T}

If used this parameter, face diffusion values would be weighted by T (of course the reconstructed value) being the face values K*T

Could you please make sure in future that your "author" field in darcs
is formatted as:
Jose M. López-Herrera Sánchez <jose.lopez...@gmail.com>

Ok, sorry for this.
 
José

Jose M. López-Herrera Sánchez

unread,
Jan 18, 2013, 7:51:16 AM1/18/13
to GFS developper discussion list
Hi Stephane,

I have come back to the issue of the face values of a TracerVOF.
Inspecting with some care gfs_vof_face_value I think I have found an
sign error. It is almost irrelevant since the error only takes place
in a not very common case. Beside I have modified your face_value
procedure slightly. I was unable to understand neither your
implementation or the figures the function gives. I have supposed
that some error has slipped so I have dared to correct it.

Attached is the patch with the above corrections.

Cheers

José

PS. The patch has as author

Jose M. Lopez-Herrera Sanchez <jose.lopez...@gmail.com>

It is the one you told me to use except for the removed accents. I
have done it because of the troubles the accent creates. It is fine or
I shall come back to my Spanish accented name?
voffacecorrection.patch

Jose M. López-Herrera Sánchez

unread,
Jan 22, 2013, 10:45:36 AM1/22/13
to GFS developper discussion list
Hi Stephane,

I have modified slightly the wiki page of VofConcentration to adequate
it to the new definition.

Jose

2013/1/9 Stephane Popinet <s.po...@gmail.com>:
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
Reply all
Reply to author
Forward
0 new messages