From 4283ff09e7d7f7ab6831340e8b9db39f6df27374 Mon Sep 17 00:00:00 2001 From: danielque Date: Tue, 10 Jan 2023 12:23:29 +0100 Subject: [PATCH] change data plotting of falling_sphere_two_way_coupling case simply plot particle's omega-z and pos-y of actual case instead of comparing omega-z of actual case to a case without torque coupling (requiring a 2nd simulation with modified setup) --- .../CFD/octave/plot_data.m | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/tutorials/cfdemSolverIB/falling_sphere_two_way_coupling/CFD/octave/plot_data.m b/tutorials/cfdemSolverIB/falling_sphere_two_way_coupling/CFD/octave/plot_data.m index 660a7b61..1dd165f7 100644 --- a/tutorials/cfdemSolverIB/falling_sphere_two_way_coupling/CFD/octave/plot_data.m +++ b/tutorials/cfdemSolverIB/falling_sphere_two_way_coupling/CFD/octave/plot_data.m @@ -1,33 +1,39 @@ clear all; clc; -%% Script to plot the angular velocities and the particle positions +% plot the angular velocity and the particle position -A = importdata('../../DEM/post/angular_velocity_no_coupling.txt',' ',1); -B = importdata('../../DEM/post/position_no_coupling.txt',' ',1); -C = importdata('../../DEM/post/angular_velocity.txt',' ',1); -D = importdata('../../DEM/post/position.txt',' ',1); +A = importdata('../../DEM/post/angular_velocity.txt',' ',1); +B = importdata('../../DEM/post/position.txt',' ',1); -pos1 = B.data(); -omega1 = A.data(); -pos2 = D.data(); -omega2 = C.data(); +omega = A.data(); +pos = B.data(); -time = omega1(:,1); -omegax1 = omega1(:,2); -omegay1 = omega1(:,3); -omegaz1 = omega1(:,4); +time1 = omega(:,1); +omegax = omega(:,2); +omegay = omega(:,3); +omegaz = omega(:,4); -time2 = omega2(:,1); -omegax2 = omega2(:,2); -omegay2 = omega2(:,3); -omegaz2 = omega2(:,4); +time2 = pos(:,1); +posx = pos(:,2); +posy = pos(:,3); +posz = pos(:,4); -figure -plot(time,omegaz1,'-.-',time2,omegaz2,'Linewidth',1.5) +figure(1) +plot(time1,omegaz,'-.-','Linewidth',1.5) xlabel('Time (s)') ylabel('Angular velocity (1/s)') -legend('One-way coupling','Two-way coupling') +legend('Two-way torque coupling') axis([0 0.5 0 11]) set(gca,'FontSize',12) -print('angular_velocity_compare.eps') +print('angular_velocity.eps') + +figure(2) +plot(time2,posy,'-.-','Linewidth',1.5) +xlabel('Time (s)') +ylabel('Y-position (m)') +legend('Two-way torque coupling') +axis([0 0.5 0 0.1]) +set(gca,'FontSize',12) +print('position.eps') +