Skip to main content

Geração de valores iniciais para problemas de N-corpos via fortran

Project description

ncorpos-vi-py

Um binding para Python da biblioteca em fortran ncorpos-vi, utilizada no gravidade-fortran.

Permite a geração de valores iniciais para problema de N-corpos e o seu condicionamento para constantes de movimento específicas.

Uso

No momento, o pacote providencia uma única classe Gerador, cuja inicialização recebe os parâmetros:

  • N: Quantidade de corpos (integer);
  • G: Constante de gravitação universal (float). Por padrão, G=1.0;
  • eps: Amortecedor para o potencial (float). Por padrão, eps=0.0;
  • modo: Modo de sorteio. Modos disponíveis:
    • sorteio: Apenas sorteia, sem condicionar;
    • sorteio_ip_iterativo: Sorteia e condiciona as integrais primeiras via método iterativo;
    • sorteio_ip_direto: Sorteia e condiciona as integrais primeiras via método direto;
    • sorteio_aarseth: Sorteia e condiciona as integrais primeiras conforme proposto por (Aarseth, 2003), forçando $E=-0.25$, $J = 0$, $P=0$ e com $2T = - V$ no instante inicial;
    • sorteio_aarseth_modificado: Igual ao sorteio_aarseth se eps=0.0, mas implementa um método iterativo para obter o equilíbrio inicial quando eps!=0.0.
  • energia: Valor da energia total desejada. Por padrão, energia=0.0.
  • angular: Valor do momento angular total desejada. Por padrão, angular=[0.0,0.0,0.0].
  • linear: Valor do momento linear total desejada. Por padrão, linear=[0.0,0.0,0.0].

Exemplo de uso:

>>> import ncorpos_vi

>>> G = ncorpos_vi.Gerador(N=10, modo="sorteio_ip_direto")

Isso instancia a classe. É possível re-instanciar usando a função configurar, que recebe os mesmos parâmetros do inicializador. Não modifique as variáveis diretamente na classe, pois isso não funcionará!

Exemplo de geração de valores iniciais:

>>> G.gerar()
Gerando valores iniciais com as seguintes configuracoes: 
N = 10 / G = 1.0 / eps = 0.0 / modo = sorteio_ip_direto
Constantes de movimento: E = 0.0 / J = [0.0, 0.0, 0.0] / P = [0.0, 0.0, 0.0]

Massas:
 - intervalo = [1.0, 1.0]
 - normalizadas = False

Posicoes:
 - distribuicao = uniforme
 - regiao = cubo
 - intervalo = [-10.0, 10.0]

Momentos lineares:
 - distribuicao = uniforme
 - regiao = cubo
 - intervalo = [-1.0, 1.0]

GERACAO DAS VALORES INICIAIS (sorteio_ip_direto)
  > gerando valores...
    * gerando massas
    * gerando posicoes (uniforme)
    * gerando momentos (uniforme)
 
  > condicionando...
    > coeficientes:
      * alpha =   1.0000000000000000     
      * beta  =   1.2544283054674359     
      * S1    =   3.2290389342212205     
      * S2    =   0.0000000000000000     
      * T.I.  =   588.96154068688691        393.72305489257315        437.72817364181810     
      * Autovalores (T.I.):    314.89279495786678        506.12642349964420        599.39355076376728     
 
  > valores iniciais condicionados!
      * V   =   -5.0811845827341813     
      * T   =    5.0811845827341831     
      * E   =    1.7763568394002505E-015
      * Vir =    5.0811845827341848     
      * J   =    3.9968028886505635E-015  -1.7763568394002505E-015  -5.5511151231257827E-015
      * P   =   -2.2204460492503131E-016  -1.6653345369377348E-016   2.6454533008646308E-016
      * I   =    710.20638461063891     
      * D   =   -30.363431913548109     
      * A_I =   0.31904518875470239     
      * MD  =    11.523791095116417 

Referências

  • AARSETH, Sverre. Gravitational N-Body Simulations: Tools and Algorithms. Cambridge: Cambridge University Press, 2003.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ncorpos_vi_py-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (15.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

ncorpos_vi_py-1.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (15.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

ncorpos_vi_py-1.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (15.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

ncorpos_vi_py-1.0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (15.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file ncorpos_vi_py-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ncorpos_vi_py-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 736cd0b350525c7223f092092aa3fdb0d149a2c1043f7564d3d23fb966c8385f
MD5 cc3e19bf701c27a3f421930eaf88408c
BLAKE2b-256 e319eacb74e9eff0b150e8a886b460092be1f5ea005899334018e65a574f9808

See more details on using hashes here.

Provenance

The following attestation bundles were made for ncorpos_vi_py-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: pypi.yml on Potalej/ncorpos-vi-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ncorpos_vi_py-1.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ncorpos_vi_py-1.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 82f059958ac8078b862ecb9bb2d29e4094490ac20fbb7c76f5d50899b510b230
MD5 1d430a7af7797c024705cc73d6cd1ea4
BLAKE2b-256 605cd2e58f6fdcfbd95583af0c21d171a9aa4f279db0664f805a9ae070cd4078

See more details on using hashes here.

Provenance

The following attestation bundles were made for ncorpos_vi_py-1.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: pypi.yml on Potalej/ncorpos-vi-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ncorpos_vi_py-1.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ncorpos_vi_py-1.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 55ac36f751a3638bc8b718a279d9bbee938d0ad951045004b023a331bc275187
MD5 a422b42e59ebdafadf69edf8fc8a2f3e
BLAKE2b-256 1d27d299ed14189b3ff3458f6061c1dc8352477adb20aa37f5d0d7839c4d1076

See more details on using hashes here.

Provenance

The following attestation bundles were made for ncorpos_vi_py-1.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: pypi.yml on Potalej/ncorpos-vi-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ncorpos_vi_py-1.0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ncorpos_vi_py-1.0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4dedac3e75b9731b6a38dda2889a3e05d24bc229ee2226ecdb36204c580dbb39
MD5 e78461011f6b95ad5576293e88fbbb52
BLAKE2b-256 fc5806edfee7e5309aaa122e840ec3edca71a6e5d75c54efaa6794cfb2bfa46a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ncorpos_vi_py-1.0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: pypi.yml on Potalej/ncorpos-vi-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page