[cig-commits] r11982 - seismo/2D/SPECFEM2D/trunk

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Sun May 18 17:03:09 PDT 2008


Author: dkomati1
Date: 2008-05-18 17:03:08 -0700 (Sun, 18 May 2008)
New Revision: 11982

Modified:
   seismo/2D/SPECFEM2D/trunk/specfem2D.F90
Log:
fixed the amplitude problem for the source detected by Paul Cristini (my previous change did not fix the same problem)


Modified: seismo/2D/SPECFEM2D/trunk/specfem2D.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/specfem2D.F90	2008-05-17 18:41:16 UTC (rev 11981)
+++ seismo/2D/SPECFEM2D/trunk/specfem2D.F90	2008-05-19 00:03:08 UTC (rev 11982)
@@ -2306,14 +2306,12 @@
 
   if(any_acoustic) then
 
-    potential_dot_dot_acoustic = potential_dot_dot_acoustic * rmass_inverse_acoustic
-
 ! --- add the source
     if(.not. initialfield) then
 ! if this processor carries the source and the source element is acoustic
       if (is_proc_source == 1 .and. .not. elastic(ispec_selected_source)) then
 ! collocated force
-! beware, for acoustic medium, source is a pressure source
+! beware, for acoustic medium, source is: pressure divided by Kappa of the fluid
 ! the sign is negative because pressure p = - Chi_dot_dot therefore we need
 ! to add minus the source to Chi_dot_dot to get plus the source in pressure
         if(source_type == 1) then
@@ -2326,6 +2324,7 @@
       endif ! if this processor carries the source and the source element is acoustic
     endif ! if not using an initial field
 
+    potential_dot_dot_acoustic = potential_dot_dot_acoustic * rmass_inverse_acoustic
     potential_dot_acoustic = potential_dot_acoustic + deltatover2*potential_dot_dot_acoustic
 
 ! free surface for an acoustic medium
@@ -2474,9 +2473,6 @@
 
   if(any_elastic) then
 
-    accel_elastic(1,:) = accel_elastic(1,:) * rmass_inverse_elastic
-    accel_elastic(2,:) = accel_elastic(2,:) * rmass_inverse_elastic
-
 ! --- add the source if it is a collocated force
     if(.not. initialfield) then
 
@@ -2485,16 +2481,17 @@
 
 ! collocated force
         if(source_type == 1) then
-          accel_elastic(1,iglob_source) = accel_elastic(1,iglob_source) &
-            - sin(angleforce)*source_time_function(it) / rho_at_source_location
-          accel_elastic(2,iglob_source) = accel_elastic(2,iglob_source) &
-            + cos(angleforce)*source_time_function(it) / rho_at_source_location
+          accel_elastic(1,iglob_source) = accel_elastic(1,iglob_source) - sin(angleforce)*source_time_function(it)
+          accel_elastic(2,iglob_source) = accel_elastic(2,iglob_source) + cos(angleforce)*source_time_function(it)
         endif
 
       endif ! if this processor carries the source and the source element is elastic
 
     endif ! if not using an initial field
 
+    accel_elastic(1,:) = accel_elastic(1,:) * rmass_inverse_elastic
+    accel_elastic(2,:) = accel_elastic(2,:) * rmass_inverse_elastic
+
     veloc_elastic = veloc_elastic + deltatover2*accel_elastic
 
   endif



More information about the cig-commits mailing list