SPECFEM / specfem2d

SPECFEM2D simulates forward and adjoint seismic wave propagation in two-dimensional acoustic, (an)elastic, poroelastic or coupled acoustic-(an)elastic-poroelastic media, with Convolution PML absorbing conditions.
https://specfem.org
GNU General Public License v3.0
203 stars 147 forks source link

Difficulty using tomographic model #1003

Open ar4 opened 6 years ago

ar4 commented 6 years ago

I have a regular grid subsurface model that I wish to use with SPECFEM2D, and want to use the built-in mesher. If I understand correctly, it seems that converting my model into the "tomo.xyz" format and then specifying the "tomo" material type in the Par file is probably the easiest way to do this. It took me quite a bit of trial and error to get SPECFEM2D to accept the Par file. I am documenting it here in case someone else has this problem. The difficulty I had may suggest that additional documentation of this topic would be helpful.

If I set the materials line to be:

1 -1 0 0 A 0 0 0 0 0 0 0 0 0 0

I get the error:

error reading material parameters line

which I believe occurs because shared/read_value_parameters.f90 expects a double instead of "A".

If instead of "A" I put 0 or a negative number, meshfem2D/read_material_table.f90 correctly reports:

Material # 1 will be read in an external tomography file (TOMOGRAPHY_FILE in Par_file)

But then meshfem2D/read_regions.f90 reports:

Material is fluid

which causes a problem, as I then get the error:

acoustic material in DATA/Par_file or external mesh redefined as non acoustic in define_external_model()

If instead of "A" in the vs slot, I put a large positive number (such as 1000.0), I get the error:

incorrect value of Poisson's ratio

even though vp in my tomo file is 1500 (so it seems to not be using that value to calculate Poisson's ratio). Finally, I discovered that setting the value to 0.5 seems to work.

komatits commented 6 years ago

Dear Alan,

Thanks! I will add your explanations to the users manual tomorrow. Good idea.

Best regards, Dimitri.

On 09/12/2018 08:15 PM, Alan Richardson wrote:

I have a regular grid subsurface model that I wish to use with SPECFEM2D, and want to use the built-in mesher. If I understand correctly, it seems that converting my model into the "tomo.xyz" format and then specifying the "tomo" material type in the Par file is probably the easiest way to do this. It took me quite a bit of trial and error to get SPECFEM2D to accept the Par file. I am documenting it here in case someone else has this problem. The difficulty I had may suggest that additional documentation of this topic would be helpful.

If I set the materials line to be:

1 -1 0 0 A 0 0 0 0 0 0 0 0 0 0

I get the error:

error reading material parameters line

which I believe occurs because |shared/read_value_parameters.f90| expects a double instead of "A".

If instead of "A" I put 0 or a negative number, |meshfem2D/read_material_table.f90| correctly reports:

Material # 1 will be read in an external tomography file
(TOMOGRAPHY_FILE in Par_file)

But then |meshfem2D/read_regions.f90| reports:

Material is fluid

which causes a problem, as I then get the error:

acoustic material in DATA/Par_file or external mesh redefined as non
acoustic in define_external_model()

If instead of "A" in the vs slot, I put a large positive number (such as 1000.0), I get the error:

incorrect value of Poisson's ratio

even though vp in my tomo file is 1500 (so it seems to not be using that value to calculate Poisson's ratio). Finally, I discovered that setting the value to 0.5 seems to work.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/geodynamics/specfem2d/issues/1003, or mute the thread https://github.com/notifications/unsubscribe-auth/AFjDKdyeye0a8WWrKmJoWr-ZxSo0nrJaks5uaU9XgaJpZM4Wl6R5.

-- Dimitri Komatitsch, CNRS Research Director (DR CNRS) Laboratory of Mechanics and Acoustics, Marseille, France http://komatitsch.free.fr

pasansherath commented 4 years ago

Hi @ar4 ,

Does the domain of the tomo.xyz file conform to that of the mesh? Could you share your tomo.xyz and Par_file with me?

Thanks very much. Pasan

ar4 commented 4 years ago

Hi Pasan,

Thank you for following-up on this topic. Unfortunately I no longer have the file. It seems as if some of the issues that I experienced might have occurred with any file, though, such as getting an error when using "1 -1 0 0 A 0 0 0 0 0 0 0 0 0 0" as the materials line (which is what I understood from the example Par_file should be used when using an external tomo file).

I do not use SPECFEM2D anymore, so please feel free to close this issue if you wish.

-Alan

On Wed, 29 Apr 2020 at 02:56, Pasan Herath notifications@github.com wrote:

Hi @ar4 https://github.com/ar4 ,

Does the domain of the tomo.xyz file conform to that of the mesh? Could you share your tomo.xyz and Par_file with me?

Thanks very much. Pasan

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geodynamics/specfem2d/issues/1003#issuecomment-620946797, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACMJSKVFDE3NU6VOUSA42ETRO6CM5ANCNFSM4FUXUR4Q .

weisenhuang commented 3 years ago

Hi @ar4 ,

Can you tell me how to convert model into the "tomo.xyz" format and then specifying the "tomo" material type in the Par file?

Thanks very much, WeiSenHuang

ar4 commented 3 years ago

Hi WeiSenHuang,

It has been several years since I used SPECFEM, so unfortunately I do not remember. Hopefully one of the SPECFEM developers will be able to tell you.

-Alan

weisenhuang commented 3 years ago

Hi Alan,

Thank you for sending me this message. 

-WenSenHuang

---Original--- From: "Alan @.> Date: Thu, Sep 23, 2021 17:07 PM To: @.>; Cc: @.**@.>; Subject: Re: [geodynamics/specfem2d] Difficulty using tomographic model (#1003)

Hi WeiSenHuang,

It has been several years since I used SPECFEM, so unfortunately I do not remember. Hopefully one of the SPECFEM developers will be able to tell you.

-Alan

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

---Original--- From: "Alan @.> Date: Thu, Sep 23, 2021 17:07 PM To: @.>; Cc: @.**@.>; Subject: Re: [geodynamics/specfem2d] Difficulty using tomographic model (#1003)

Hi WeiSenHuang,

It has been several years since I used SPECFEM, so unfortunately I do not remember. Hopefully one of the SPECFEM developers will be able to tell you.

-Alan

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

pasansherath commented 3 years ago

Hi @weisenhuang,

I was able to use a tomographic model with SPECFEM2D about a year ago. Here is what I did.

The header of the 'tomo.xyz' file shoud have the following information.

x_min z_min x_max z_max
x_spacing z_spacing
nx nz
vp_min vp_max vs_min vs_max rho_min rho_max

Then we have to give the x z vp vs and rho values for each grid point in the tomographic model.

An extract from a 'tomo.xyz' file that I used is given below.

         0         0     120000      30000
     500     500
     241       61
   4000   8500       2222       4722       2800       3300
        0      0  8500  4722  3300
    500      0  8500  4722  3300
  1000      0  8500  4722  3300
  1500      0  8500  4722  3300
  2000      0  8500  4722  3300
  2500      0  8500  4722  3300
  3000      0  8500  4722  3300
  3500      0  8500  4722  3300
  4000      0  8500  4722  3300
  4500      0  8500  4722  3300
  5000      0  8500  4722  3300

In the Par_file you have to define the following.

Under # velocity and density models, define your model as follows 1 -1 0 0 0.5 0 0 0 0 0 0 0 0 0 0

Then you have to set the tomo.xyz file path. Make sure you give the right path (I guess it should be relative to the DATA folder). TOMOGRAPHY_FILE = tomo.xyz

It should be good to go now.

Hope this helps you.

Cheers, Pasan

weisenhuang commented 3 years ago

Hi @pasansherath ,

Your answer is very helpful to me.

Thanks very much.

WeiSenHuang