[CIG-LONG] Gale densityField

Guillaume.Duclaux at csiro.au Guillaume.Duclaux at csiro.au
Tue Sep 28 02:27:16 PDT 2010


Hi Luke,

Your assumption is correct.
Walter will correct me if I'm wrong, but I can try to explain how I understand the implementation.

The discretisation between the swarm and the mesh is controlled by the type of the elements you will use for the mesh. It is specified within your script in the components part by:

<struct name="mesh-linear">
            <param name="Type">FeMesh</param>
            <param name="elementType">linear</param>
        </struct>


In this case, the element type for your mesh is linear. Consequently values for the mesh will be computed based on a linear interpolation.
In the DensityField function you are then defining the element type and this will be used for the discretisation:

<param name="Mesh">mesh-linear</param>

The element type has to be consistent within the simulation also I don't think you can define a different FeMesh elementType just for the DensityField function.

I haven't tested any other possible FeMesh element types , but it seems the following are available, have a play!

Stream_Indent( stream );
Journal_Printf( stream, "Assigning FeMesh element types...\n" );
Stream_Indent( stream );

if( !strcmp( self->feElFamily, "quadratic" ) ) {
unsigned nDims;

nDims = Mesh_GetDimSize( self );
if( nDims == 3 )
elType = (ElementType*)Triquadratic_New( "" );
else if( nDims == 2 )
elType = (ElementType*)Biquadratic_New( "" );
else
abort();
}
else if( !strcmp( self->feElFamily, "linear" ) ) {
unsigned nDims;

nDims = Mesh_GetDimSize( self );
if( nDims == 3 )
elType = (ElementType*)TrilinearElementType_New( "" );
else if( nDims == 2 )
elType = (ElementType*)BilinearElementType_New( "" );
else
abort();
}
else if( !strcmp( self->feElFamily, "linear-regular" ) ) {
unsigned nDims;

nDims = Mesh_GetDimSize( self );
if( nDims == 3 )
elType = (ElementType*)RegularTrilinear_New( "" );
else if( nDims == 2 )
elType = (ElementType*)RegularBilinear_New( "" );
else
abort();
}
else if( !strcmp( self->feElFamily, "linear-inner" ) ) {
unsigned nDims;

nDims = Mesh_GetDimSize( self );
if( nDims == 3 )
elType = (ElementType*)TrilinearInnerElType_New( "" );
else if( nDims == 2 )
elType = (ElementType*)BilinearInnerElType_New( "" );
else
abort();
}
else if( !strcmp( self->feElFamily, "constant" ) ) {
elType = (ElementType*)ConstantElementType_New( "" );
}
else if( !strcmp( self->feElFamily, "p1" ) ) {
elType = (ElementType*)P1_New( "" );
}
else
abort();
FeMesh_SetElementType( self, elType );
if( self->feElType )
Stg_Component_Build( self->feElType, data, False );


Hope that helps.

Cheers

Gilly


On 28/09/2010, at 11:08 AM, Luke Mondy wrote:

Hello,

I was wondering if someone could explain how the densityField in Gale works? I use the following code to get it to output to the VTK files:
<struct name="DensityField">
<param name="Type">DensityField</param>
<param name="Context">context</param>
<param name="ConstitutiveMatrix">constitutiveMatrix</param>
<param name="Swarm">picIntegrationPoints</param>
<param name="Mesh">mesh-linear</param>
<param name="BuoyancyForceTerm">buoyancyForceTerm</param>
</struct>

I assume some sort of linear interpolation over the particles is then assigned to each cell of the mesh - is this the case, and if so, is there a way to choose what method of interpolation can be used?

Kind Regards,

Luke Mondy
_______________________________________________
CIG-LONG mailing list
CIG-LONG at geodynamics.org<mailto:CIG-LONG at geodynamics.org>
http://geodynamics.org/cgi-bin/mailman/listinfo/cig-long


Dr Guillaume Duclaux

Mineral Down Under Flagship & AuScope Grid
CSIRO Earth Science and Resource Engineering

Phone: +61 8 6436 8728  | Fax: +61 8 6436 8559  | Mobile:  +61 422 289 732

guillaume.duclaux at csiro.au<mailto:guillaume.duclaux at csiro.au> | www.csiro.au<http://www.csiro.au/> |
Address: Australian Resources Research Centre, 26 Dick Perry Avenue, Kensington WA 6151

PLEASE NOTE
The information contained in this email may be confidential or privileged. Any unauthorised use or disclosure is prohibited. If you have received this email in error, please delete it immediately and notify the sender by return email. Thank you. To the extent permitted by law, CSIRO does not represent, warrant and/or guarantee that the integrity of this communication has been maintained or that the communication is free of errors, virus, interception or interference.

Please consider the environment before printing this email.





More information about the CIG-LONG mailing list