Jacobi Grid Transformation
The significance of the Jacobian is that it represents the validity of the mapping from physical space to computational space. In order for a mapping to be valid the Jacobian should have the same sign throughout the domain, i.e. for a transformation from a right-handed coordinate system to a right-handed coordinate system the Jacobian should be greater than zero. Where the Jacobian goes to zero, the mapping fails to be one-to-one and the inverse transformation no longer exists. In practical terms the Jacobian can be used as a measure of grid quality - since it also can be thought of as the volume of a grid cell the Jacobian distribution should be smoothly varying in the domain.
%% Function to Create Jacobi Mesh Grid from Linear Mesh
%% Authors: Tauseef Gulrez and Aamer Shahzad,
%% Locations: Melbourne, Australia and Islamabad, Pakistan.
%% This code was first written on 28-09-2016 at Uiversity of New South Wales
%% Australian Defence Force Academy (ADFA), Canberra, Australia.
%
% Example main file to use the function.
% See the function file for Jacobi_Grid.m for explanation.
%
% Copyright 2018, Tauseef Gulrez & Aamer Shahzad.
% gtauseef@ieee.org
%
clear all; clc; close all;
% boundary.dat file is the mesh points file, in our case it has 280 (x,y) points.
[x,y,x_inter,y_inter] = jacobi_grid(70,70,'boundary.dat');
z = sind(x); z_inter = sind(x_inter);
imax = 70;
jmax = 70;
%
figure;
%
s1 = subplot(1,2,1); surf(x_inter,y_inter,z_inter);
title('Linear Mesh'); view(-0, 90); grid off; box on; axis tight;
xlabel('x-axis'); ylabel('y-axis')
%
s2 = subplot(1,2,2); surf(x,y,z);
title('Jacobian Transformed Mesh') ;
view(-0, 90); grid off; box on; axis tight;
xlabel('x-axis'); ylabel('y-axis');
引用格式
Tauseef Gulrez (2024). Jacobi Grid Transformation (https://www.mathworks.com/matlabcentral/fileexchange/67843-jacobi-grid-transformation), MATLAB Central File Exchange. 检索来源 .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!