underworldcode / UWGeodynamics

Underworld Geodynamics
Other
81 stars 32 forks source link

Linear Density #147

Closed antonio-schettino closed 4 years ago

antonio-schettino commented 5 years ago

Hi, I am trying to set up an upper mantle model (35 <= z <= 670 km) with linear density in state equation: Upper_Mantle.density = GEO.LinearDensity(rho_ref,thermalExpansivity = alpha,beta = 1.0e-11 / u.pascal) where: rho_ref = 3370. * u.kilogram / u.metre*3 alpha = 3.5e-5 / u.kelvin and (T,P) have been initialized in the range (Tc = 968.4 u.degK,Tz = 1900.0 * u.degK) and linear increase in pressure up to ~23 GPa. The model is initialized by the following call: Model.init_model(temperature = False,pressureField = False) The resulting density ranges between ~3957 kg m-3 at z = 670 km and ~3946 kg m-3 at z = 35 km, while it should range between 3959 and 1380 kg m-3. I have tried with several different values of beta in GEO.LinearDensity() but the resulting density is anyway approximately constant. Please can you help me to solve this problem? Below please find a segment of the variable listing close to the lower boundary:

670000.0 meter [ 1900.] kelvin [ 3957.43008757] kilogram / meter 3 [ 23115.1] megapascal 660000.0 meter [ 1894.26578947] kelvin [ 3957.24911107] kilogram / meter 3 [ 22770.1] megapascal 650000.0 meter [ 1888.53157895] kelvin [ 3957.29996943] kilogram / meter 3 [ 22425.1] megapascal 640000.0 meter [ 1882.79736842] kelvin [ 3957.69758933] kilogram / meter 3 [ 22080.1] megapascal

I thank you

Antonio

julesghub commented 5 years ago

Are you sure the temperature field is correct? By calling temperature=False in Model.init_model() the temperature field is NOT solved using poisson's equation. Try temperature=True and visualise the temperature field to ensure it is as expected.

antonio-schettino commented 5 years ago

Temperature is OK, it is initialized independently. In any case: 1. (P,T) are independent variables, thereby I should obtain anyway the density through the linearized state equation and 2. Even using temperature=True the density remains approximately constant (in this instance, it ranges between 3958 and 3948 kg m-3.

Best regards,

Antonio

Antonio Schettino School of Science and Technology Geology Division University of Camerino Via Gentile III da Varano 62032 Camerino - Italy Phone : +39.(0)737.402641 Fax. : +39.(0)737.402644 Cell. : 327-3148561

On Mon, 21 Oct 2019 at 01:02, Julian Giordani notifications@github.com wrote:

Are you sure the temperature field is correct? By calling temperature=False in Model.init_model() the temperature field is NOT solved using poisson's equation. Try temperature=True and visualise the temperature field to ensure it is as expected.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/underworldcode/UWGeodynamics/issues/147?email_source=notifications&email_token=AKWHZMWUAISU66A7S67MJ5TQPTPRVA5CNFSM4JCU62QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBYWHNY#issuecomment-544302007, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKWHZMUSC3HQXVS3GZO4TPLQPTPRVANCNFSM4JCU62QA .

julesghub commented 5 years ago

Can you send visuals of the material field, temperature field and pressure field. Those are the 3 inputs that will determine the density field.

Also which version of UWGeo are you using? print(GEO.__version)

antonio-schettino commented 5 years ago

Dear Julian,

Attached please find the initialization file (.ipynb). The call print(GEO.version) responds: <module 'UWGeodynamics.version' from '/usr/local/lib/python3.5/dist-packages/UWGeodynamics/version.py'>. A strange thing is that the density plot is correct, while the listed densities are wrong.

Best regards,

Antonio

Antonio Schettino School of Science and Technology Geology Division University of Camerino Via Gentile III da Varano 62032 Camerino - Italy Phone : +39.(0)737.402641 Fax. : +39.(0)737.402644 Cell. : 327-3148561

On Mon, 21 Oct 2019 at 23:26, Julian Giordani notifications@github.com wrote:

Can you send visuals of the material field, temperature field and pressure field. Those are the 3 inputs that will determine the density field.

Also which version of UWGeo are you using? print(GEO.__version)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/underworldcode/UWGeodynamics/issues/147?email_source=notifications&email_token=AKWHZMVJCRLCFWIANE6WBADQPYM7HA5CNFSM4JCU62QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB33BDI#issuecomment-544714893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKWHZMREZ4OMS2FTOVCJTG3QPYM7HANCNFSM4JCU62QA .

julesghub commented 5 years ago

Hi Antonio, no attachment unfortunately. Can you upload it via github's interface instead of email. You should remove all output in the .ipynb before uploading it to minimise the size.

Also I made a typo in the version command, I meant print(GEO.__version__)

antonio-schettino commented 5 years ago

hi Julian,

Version is 2.8.3. Below please find a pdf of the initial segment (without velocity BCs).

[Rifting_Model_Init.pdf]

(https://github.com/underworldcode/UWGeodynamics/files/3760796/Rifting_Model_Init.pdf)

If you run this procedure, you will see that the density plot is correct, while the listed densities are wrong. There are also secondary errors associated with indexing. I can't find a reason.

antonio-schettino commented 5 years ago

Hi Julian,

I have uploaded a pdf of the procedure as requested.

Best regards,

Antonio

Antonio Schettino School of Science and Technology Geology Division University of Camerino Via Gentile III da Varano 62032 Camerino - Italy Phone : +39.(0)737.402641 Fax. : +39.(0)737.402644 Cell. : 327-3148561

On Wed, 23 Oct 2019 at 00:18, Julian Giordani notifications@github.com wrote:

Hi Antonio, no attachment unfortunately. Can you upload it via github interface than email. You should remove all output in the .ipynb before uploading it to minimise the size.

Also I made a typo in the version command, I meant print(GEO.version)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/underworldcode/UWGeodynamics/issues/147?email_source=notifications&email_token=AKWHZMUWAV6AMES55W2KMPDQP532LA5CNFSM4JCU62QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB7MTUY#issuecomment-545180115, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKWHZMSXG4PMAURR7YF6WQDQP532LANCNFSM4JCU62QA .

julesghub commented 5 years ago

Hi Antonio, Thanks for the file but pdf format is difficult to work with. Would you be able to send the file in another format or (even better) put the file in a github repository and invite me as a collaborator to it.

rbeucher commented 5 years ago

Hi Antonio,

Do you still require our support?

antonio-schettino commented 5 years ago

Hi Romain,

I didn't obtain any support for this issue. However, I have now decided to come back to the standard underworld2 APIs. Therefore, it is possible to close it.

Best regards,

Antonio

Antonio Schettino School of Science and Technology Geology Division University of Camerino Via Gentile III da Varano 62032 Camerino - Italy Phone : +39.(0)737.402641 Fax. : +39.(0)737.402644 Cell. : 327-3148561

On Thu, 14 Nov 2019 at 09:55, Romain Beucher notifications@github.com wrote:

Hi Antonio,

Do you still require our support?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/underworldcode/UWGeodynamics/issues/147?email_source=notifications&email_token=AKWHZMUZ7VRRDXO3PMEV7STQTUHBHA5CNFSM4JCU62QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEBCP3I#issuecomment-553789421, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKWHZMWDDUFHFVTZE7GJAQTQTUHBHANCNFSM4JCU62QA .

rbeucher commented 5 years ago

Sorry about that, I will have a look at your script and get back to you. I leave this open for now as the question has not been resolved yet.

rbeucher commented 4 years ago

Hi @antonio-schettino ,

It's been a while sorry. Things got pretty crazy in Australia. I have added an example that might be useful:

https://github.com/underworldcode/UWGeodynamics/blob/master/examples/1_31_User_defined_geotherm_and_TP_dependent_densities.ipynb

Let me know if that helps.

Romain

I will close that for now, feel free to reopen.

antonio-schettino commented 4 years ago

Dear Romain,

Good job! It will be very useful.

Best regards,

Antonio

Antonio Schettino School of Science and Technology Geology Division University of Camerino Via Gentile III da Varano 62032 Camerino - Italy Phone : +39.(0)737.402641 Fax. : +39.(0)737.402644 Cell. : 327-3148561

On Fri, 27 Mar 2020 at 04:25, Romain Beucher notifications@github.com wrote:

Hi @antonio-schettino https://github.com/antonio-schettino ,

It's been a while sorry. Things got pretty crazy in Australia. I have added an example that might be useful:

https://github.com/underworldcode/UWGeodynamics/blob/master/examples/1_31_User_defined_geotherm_and_TP_dependent_densities.ipynb

Let me know if that helps.

Romain

I will close that for now, feel free to reopen.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/underworldcode/UWGeodynamics/issues/147#issuecomment-604795136, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKWHZMUNMLFFP22OMYBDW6DRJQMC3ANCNFSM4JCU62QA .