Interpolation method in PLE library

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
yang
Posts: 15
Joined: Thu Jul 14, 2022 3:39 pm

Interpolation method in PLE library

Post by yang »

Hi team,

Now, I am using Code_Saturne v7.0.2 and corresponding PLE library. I have successfully achieved a coupling simulation based on different uniform mesh as shown in Fig.1. To make clear, I separate the receiver layer (blue) and donator(red) as shown in Fig.2 in which black arrow means mapping relation through function ple_locator_set_mesh.

After transferred information through function ple_locator_exchange_point_var, I found the received values at #1 and #2 are same based on simulation.( besides, #3 and #4 same, #5 and #6 same, #7 and #8 same). In my opinion, the value of #1 and #2 should be different, and obtained by interpolation method from #a. Could you help me explain this?
Thanks!

Best wishes,
Yang
Attachments
1.png
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Interpolation method in PLE library

Post by Yvan Fournier »

Hello,
Your observation is correct.

As explained in the bibliography (https://doi.org/10.1080/10618562.2020.1810676, or preprint at https://hal.science/hal-02494687/document), PLE does not provide its own interpolation, but provides information (coordinates of the located points in addition to element ids) allowing the caller code to define such an interpolation.

This is related to PLE being used for a code_saturne, where interpolation is based on reconstruction (with different gradient options), and not on shape functions.

The simplest (and most commonly used) interpolation used in this context is tu do a P1-reconstruction using a 1st order Taylor expansion (and which involves computing a gradient).

Best regards,

Yvan
yang
Posts: 15
Joined: Thu Jul 14, 2022 3:39 pm

Re: Interpolation method in PLE library

Post by yang »

Thanks Yvan,

I have fixed this problem through the 1st order Taylor expansion.

By the way, I'd like to make clear using of the function ple_locator_set_mesh. For this case, I want to achieve one-way information transformation from donator to receiver. On the receiver side, I defined the coordinates of coupling points (i.g. #1, #2, #3, #4, #5, #6, #7 and #8), while on the donator, I also defined the coordinates of coupling points(#a, #b, #c and #d). Then, I placed the coordinates array to 10th term of function ple_locator_set_mesh and both donator and receiver software call function ple_locator_set_mesh to establish mapping relationship. Finally, dornator extracts data by function ple_locator_get_n_dist_points and ple_locator_get_dist_locations and sends to receiver.

Is it necessary to define the coordinates on donator side (like: #a, #b, #c and d)?

Code: Select all

void ple_locator_set_mesh	(	ple_locator_t * 	this_locator,
const void * 	mesh,
const int * 	options,
float 	tolerance_base,
float 	tolerance_fraction,
int 	dim,
ple_lnum_t 	n_points,
const ple_lnum_t 	point_list[],
const int 	point_tag[],
const ple_coord_t 	point_coords[],
float 	distance[],
ple_mesh_extents_t * 	mesh_extents_f,
ple_mesh_elements_locate_t * 	mesh_locate_f 
)	
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Interpolation method in PLE library

Post by Yvan Fournier »

Hello,

No, for one-way coupling, you only need to define points on the receiver side, and only need to define the mesh on the donor side (and use NULL for points on the donor, and optionally also NULL for the mesh on the receiver side).

Best regards,

Yvan
Post Reply