00001 module physicalParameters 00002 use solverParameters ! added to enable the user to add physics specific solver parameters 00003 use localParameters 00004 implicit none ! implicit none's are not needed in the contained functions 00005 ! and subroutines however if one needs to copy the function 00006 ! as a stand-alone code then implicit none should be present 00007 00008 integer n ! problem size 00009 00010 00011 00012 contains 00013 00014 00015 00016 ! variables cannot be assigned to values unless called in a separate 00017 ! function or subroutine. the following subroutine should still be 00018 ! called in the body of the main routine or the driving routine 00019 ! of the physics 00020 subroutine initializePhysics() 00021 00022 implicit none 00023 00024 00025 00026 !############################################################################# 00027 !PRE-PROCESSING 00028 !############################################################################# 00029 00030 00031 00032 ! 2d problem 00033 00034 00035 ! initialize problem size 00036 00037 nx=33 !local 00038 ny=33 !local 00039 unk=1 !local 00040 00041 n=nx*ny*unk !global 00042 00043 lambda=1.d0 !local 00044 lambda=6.8d0 !local 00045 00046 Lx=1.d0 !local 00047 Ly=1.d0 !local 00048 00049 00050 00051 00052 !############################################################################# 00053 !PROCESSING 00054 !############################################################################# 00055 00056 00057 00058 00059 !# nonlinear parameters 00060 00061 maxNewtonIter=20 ! default is 40 00062 00063 00064 00065 00066 NewtonConvergenceOption=1 00067 nonlinearTolAbs=1e-8 00068 00069 00070 !NewtonConvergenceOption=2 00071 !nonlinearTolRel=1e-7 00072 00073 !NewtonConvergenceOption=3 00074 !nonlinearTolAbs=1e-8 00075 !nonlinearTolRel=1e-7 00076 00077 00078 00079 !enableNewtonBasic=OFF 00080 !enableNewtonDebug=ON 00081 !enableNewtonDebugExtra=ON 00082 00083 00084 00085 !# linear parameters 00086 00087 maxLinearIter=500 00088 00089 linearTol=1e-5 00090 00091 00092 00093 !############################################################################# 00094 !POST-PROCESSING 00095 !############################################################################# 00096 00097 00098 00099 00100 00101 displaySolution=OFF 00102 !printSolution=OFF 00103 00104 00105 00106 00107 00108 end subroutine initializePhysics 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 end module physicalParameters
1.5.8