chemistry in motion. reaction–diffusion systems for micro- and nanotechnology, 2009, p.305

305 585 0
chemistry in motion. reaction–diffusion systems for micro- and nanotechnology, 2009, p.305

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Chemistry in Motion: Reaction–Diffusion Systems for Micro- and Nanotechnology Bartosz A Grzybowski Northwestern University, Evanston, USA Chemistry in Motion Chemistry in Motion: Reaction–Diffusion Systems for Micro- and Nanotechnology Bartosz A Grzybowski Northwestern University, Evanston, USA This edition first published 2009 # 2009 John Wiley & Sons Ltd Registered office John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom For details of our global editorial offices, for customer services and for information about how to apply for permission to reuse the copyright material in this book please see our website at www.wiley.com The right of the author to be identified as the author of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988 All rights reserved No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of the publisher Wiley also publishes its books in a variety of electronic formats Some content that appears in print may not be available in electronic books Designations used by companies to distinguish their products are often claimed as trademarks All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners The publisher is not associated with any product or vendor mentioned in this book This publication is designed to provide accurate and authoritative information in regard to the subject matter covered It is sold on the understanding that the publisher is not engaged in rendering professional services If professional advice or other expert assistance is required, the services of a competent professional should be sought The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation any implied warranties of fitness for a particular purpose This work is sold with the understanding that the publisher is not engaged in rendering professional services The advice and strategies contained herein may not be suitable for every situation In view of ongoing research, equipment modifications, changes in governmental regulations, and the constant flow of information relating to the use of experimental reagents, equipment, and devices, the reader is urged to review and evaluate the information provided in the package insert or instructions for each chemical, piece of equipment, reagent, or device for, among other things, any changes in the instructions or indication of usage and for added warnings and precautions The fact that an organization or Website is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Website may provide or recommendations it may make Further, readers should be aware that Internet Websites listed in this work may have changed or disappeared between when this work was written and when it is read No warranty may be created or extended by any promotional statements for this work Neither the publisher nor the author shall be liable for any damages arising herefrom Library of Congress Cataloging-in-Publication Data Grzybowski, Bartosz A Chemistry in motion : reaction-diffusion systems for micro- and nanotechnology / Bartosz A Grzybowski p cm Includes bibliographical references and index ISBN 978-0-470-03043-1 (cloth : alk paper) Reaction mechanism Reaction-diffusion equations Microtechnology–Mathematics Nanotechnology–Mathematics I Title QD502.5.G79 2009 2008044520 5410 39–dc22 A catalogue record for this book is available from the British Library ISBN: 978-0-470-03043-1 (HB) Typeset in 10/12pt Sabon by Thomson Digital, Noida, India Printed and bound in Singapore by Fabulous Printers Pte Ltd To Jolanta, Andrzej and Kristiana with gratitude and love Contents Preface List of Boxed Examples xi xiii Panta Rei: Everything Flows 1.1 Historical Perspective 1.2 What Lies Ahead? 1.3 How Nature Uses RD 1.3.1 Animate Systems 1.3.2 Inanimate Systems 1.4 RD in Science and Technology References 1 12 Basic Ingredients: Diffusion 2.1 Diffusion Equation 2.2 Solving Diffusion Equations 2.2.1 Separation of Variables 2.2.2 Laplace Transforms 2.3 The Use of Symmetry and Superposition 2.4 Cylindrical and Spherical Coordinates 2.5 Advanced Topics References 17 17 20 20 26 31 34 38 43 Chemical Reactions 3.1 Reactions and Rates 3.2 Chemical Equilibrium 3.3 Ionic Reactions and Solubility Products 3.4 Autocatalysis, Cooperativity and Feedback 3.5 Oscillating Reactions 45 45 50 51 52 55 272 APPENDIX B if X(i,j) == 255 X(i,j) = 0; elseif X(i,j) == %Diffusion space %correspond to a 256 color %bitmap %Wall %Also, reset the colors to %the above color map X(i,j) = 1; C(i,j,:) = 2; elseif X(i,j) == 250 %Source (Lair) %Colors are from the standard %pallet in X(i,j) = 2; C(i,j,:) = source; %Microsoft Paint, with the %wallscolored elseif X(i,j) == 249 %Sink (Exit) %black, the diffusion areas %white, the source X(i,j) = 3; C(i,j,:)= sink; %area(s) green, and the sink %areas red end end end imwrite(X,map,int2str(0),’bmp’) %Save the initialstate as ’0’ for t = 1:tmax if mod(t,100) == %Output the concentrations [toc, t/100] %every 100 iterations for i = 1:size(X,1) for j = 1:size(X,2) if X(i,j) == %Translate actual %concentrations O(i,j) = floor(C(i,j,2)*251+5); %into the color map used %above else O(i,j) = X(i,j)+1; end end end imwrite(O,map,int2str(t),’bmp’) %Write the file, with the name end %corresponding to the time %step APPENDIX B C(:,:,1)=C(:,:,2); for i = 1:size(X,1) for j = 1:size(X,2) if X(i,j) == 273 %Reset the concentration %matrix %Perform diffusion only at %nodes switch (X(i+1,j)*10)+(X(i-1,j)) %that allow diffusion, also %read: case {0, 2, 3, 20, 22, 23,30, 32, 33} %Treatment of individual %nodes C(i,j,2) = C(i,j,1)+alpha*(C(i-1,j,1)+C(i+1,j,1)2*C(i,j,1)); case {1,21,31} C(i,j,2) = C(i,j,1)+alpha*(C(i+1,j,1)+C(i+1,j,1)2*C(i,j,1)); case {10,12,13} C(i,j,2) = C(i,j,1)+alpha*(C(i-1,j,1)+C(i-1,j,1)2*C(i,j,1)); case 11 C(i,j,2) = C(i,j,1); end switch X(i,j+1)*10+(X(i,j-1)) %Abbreviations defined below case {0, 2, 3, 20, 22, 23, 30, 32, 33} %DD C(i,j,2) = C(i,j,2)+alpha*(C(i,j-1,1)+C(i,j+1,1)2*C(i,j,1)); case {1,21,31} %DW C(i,j,2) = C(i,j,2)+alpha*(C(i,j+1,1)+C(i,j+1,1)2*C(i,j,1)); case {10,12,13} %WD C(i,j,2) = C(i,j,2)+alpha*(C(i,j-1,1)+C(i,j-1,1)2*C(i,j,1)); case 11 %WW C(i,j,2) = C(i,j,2); end end end end end %{ 274 APPENDIX B Treatment of individual nodes In a square lattice with four types of nodes (diffusion, source, sink or wall), each node has four independent nearest neighbors (NNs) Each of the four NNs can have any one of those four values, resulting in a maximum of 256 unique combinations of NNs in a given calculation Writing code to address each of these unique combinations is both tedious and error-prone due to there being many copies of very similar code However, the 256 combinations of NNs can be divided into two sets of four mathematically unique cases by: (i) separating the diffusion operation into two discrete steps and (ii) grouping mathematically identical nodes In (i), by separating the diffusion operation into two discrete steps, one along the i axis and one along the j axis, the four NNs of each node are treated as two independent sets of two NNs This reduces the 256 unique combinations of four NNs to two sets of 16 unique pairs of NNs In (ii), the forward time centered space (FTCS) method for constant concentration NNs (either sources or sinks) is mathematically identical to the method for NNs that allow diffusion, leaving only two types of NN – diffusing (D) and wall (W) When only two mathematically different NNs exist, the number of pairs of NNs on each axis is reduced from 16 to The four pairs of NNs correspond to: both NNs allow diffusion (DD), the left or upper neighbor allows diffusion and the right or lower neighbor is a wall (DW), the left or upper neighbor is a wall and the right or lower neighbor allows diffusion (WD) and both NNs are walls (WW) The concentration change at a particular node is calculated by encoding the type of NN on each axis, then applying the appropriate concentration changes (DD, DW, WD or WW) for each axis The code can be made significantly more efficient by writing the diffusion algorithm twice – using an explicit step from C(:,:,1) to C(:,:,2), followed by an explicit step from C(:,:,2) to C(:,:,1) – instead of copying the entire matrix during each iteration Appendix C: C ỵ ỵ Code for the Zebra (Example 4.3) #include #include #include using namespace std; #define UP (0x00000001) #define RI (0x00000002) #define DN (0x00000004) #define LE (0x00000008) #define RU (0x0000000E) #define RR (0x0000000D) //Define the velocity vectors, //and some constants //for adding and removing //particles //NX(x) counts the number of //particles at a node //RotL(x) rotates x p/2 //radians counterclockwise //RotR(x) rotates x p/2 //radians clockwise #define RD (0x0000000B) #define RL (0x00000007) #define MA (0x0000000F) #define EMPTY (0x00000000) #define NX(x)((x&UP)+((x&RI)>>1)+((x&DN)>>2)+((x&LE)>>3)) #define RotL(x) (x&UP)?(LE+(x>>1)):(x>>1) #define RotR(x) (x&LE)?(UP+(MA&(x1)) int addone(int); //Two functions for adding //and removing Chemistry in Motion: Reaction–Diffusion Systems for Micro- and Nanotechnology Bartosz A Grzybowski Ó 2009 John Wiley & Sons, Ltd 276 int remone(int); int main(void){ int size = 250; const double dX = 1; APPENDIX C //particles from nodes //Included after the main() //Define the probabilities for //diffusion const double dY = 3; const double r1 = 0; //Define the rate constants const double r2 = 1; const double r3 = 11; const double r4 = 7; const double r5 = 6; const double r6 = 6; const double rmax = 150; const int maxstep = 5000;//Simulation stopping point FILE *fid; int X[size][size], Y[size][size], C[size][size],PrX [size][size], PrY[size][size]; int i,j,k,l,cn, addx, addy, x,y; char fname[50]; double p,paddA,pAtoB,pkillA,paddB,pkillB; srand48(time(0)); for(i=0; i < size; i++){ //Initialize the matrices for(j = 0; j

Ngày đăng: 04/06/2014, 15:05

Từ khóa liên quan

Mục lục

  • Chemistry in Motion: Reaction–Diffusion Systems for Micro- and Nanotechnology

    • Contents

    • Preface

    • List of Boxed Examples

    • 1 Panta Rei: Everything Flows

      • 1.1 HISTORICAL PERSPECTIVE

      • 1.2 WHAT LIES AHEAD?

      • 1.3 HOW NATURE USES RD

        • 1.3.1 Animate Systems

        • 1.3.2 Inanimate Systems

        • 1.4 RD IN SCIENCE AND TECHNOLOGY

        • REFERENCES

        • 2 Basic Ingredients: Diffusion

          • 2.1 DIFFUSION EQUATION

          • 2.2 SOLVING DIFFUSION EQUATIONS

            • 2.2.1 Separation of Variables

            • 2.2.2 Laplace Transforms

            • 2.3 THE USE OF SYMMETRY AND SUPERPOSITION

            • 2.4 CYLINDRICAL AND SPHERICAL COORDINATES

            • 2.5 ADVANCED TOPICS

            • REFERENCES

            • 3 Chemical Reactions

              • 3.1 REACTIONS AND RATES

              • 3.2 CHEMICAL EQUILIBRIUM

              • 3.3 IONIC REACTIONS AND SOLUBILITY PRODUCTS

              • 3.4 AUTOCATALYSIS, COOPERATIVITY AND FEEDBACK

Tài liệu cùng người dùng

Tài liệu liên quan