% \polymer_flow_1D\polymer_flow_1D_input1.m
%
% function [System,Fluid,Grid,iflag] = polymer_flow_1D_input();
%
% This function sets the simulation parameters for the 1D polymer
% flow numerical calculation, and is used as the primary means to
% input data into the simulation.
%
% OUTPUT :
% ========
% System = data structure containing system parameters
% .B
% REAL
% The distance between the two parallel plates.
% .dp_dx
% REAL
% The pressure gradient in the x direction that drives the flow.
% .velocity_up
% REAL
% The velocity of the upper plate in the x-direction.
%
% Fluid = data structure containing fluid parameters
% .visc_0
% REAL
% The zero shear rate viscosity of the fluid.
% .visc_inf
% REAL
% The limiting viscosity as the shear rate approaches infinity.
% .relax_t
% REAL
% The relaxation time of the fluid.
% .n_pow
% REAL
% The power-law exponent of the fluid.
% .a
% REAL
% The coefficient controlling the shape of the viscosity
% curve in the cross-over region.
%
% Grid = data structure containing compuational grid data
% .num_pts
% INT
% The number of grid points in the y-direction.
% .y
% REAL(num_pts)
% The values of the y coordinate at each grid point. For
% simplicity, we will use a uniform grid.

function [System,Fluid,Grid,iflag] = polymer_flow_1D_input1();

iflag = 0;

%PDL> Set the value of the distance between the plates, the pressure
% gradient, and the velocity of the upper plate.
System.B = 0.01; % m
System.dp_dx = -1e7; % Pa/m
System.velocity_up = 0; % m/s

%PDL> Set the parameters that define the constitutive equation
% relating shear rate to viscosity for the polymer fluid.
Fluid.visc_0 = 1180; % Pa*s
Fluid.visc_inf = 0;
Fluid.relax_t = 9.24e-2; % s
Fluid.n_pow = 0.441;
Fluid.a = 2;


%PDL> Specify the number of points in the computational grid, and
% set their locations based on a uniform grid spacing.
Grid.num_pts = 50;
Grid.y = linspace(0,System.B,Grid.num_pts)';

iflag = 1;

return;