Jacobi Grid Transformation

The Jacobian is used to transform grid from one coordinate system to another.
118 Downloads
Updated Tue, 26 Jun 2018 10:49:09 +0000

View License

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');

Cite As

Tauseef Gulrez (2024). Jacobi Grid Transformation (https://www.mathworks.com/matlabcentral/fileexchange/67843-jacobi-grid-transformation), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Systems of Nonlinear Equations in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.2.0.0

.

1.1.0.0

.

1.0.0.0