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 aosorteio_aarsethseeps=0.0, mas implementa um método iterativo para obter o equilíbrio inicial quandoeps!=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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ncorpos_vi_py-1.0.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: ncorpos_vi_py-1.0.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 15.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a72d5c279a7f458228afd5cd20d747e243d62157bdf426f0b555d8e95f2d3532
|
|
| MD5 |
ed94104ad5778a4bcd1c848962213c37
|
|
| BLAKE2b-256 |
de977464ea7b11a4da9830861e864a0d355327f9c31eb8b50f177ed213e2ce37
|
Provenance
The following attestation bundles were made for ncorpos_vi_py-1.0.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
pypi.yml on Potalej/ncorpos-vi-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ncorpos_vi_py-1.0.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
a72d5c279a7f458228afd5cd20d747e243d62157bdf426f0b555d8e95f2d3532 - Sigstore transparency entry: 775596835
- Sigstore integration time:
-
Permalink:
Potalej/ncorpos-vi-py@936b3fc4a2d6d46d9b7fba582128cd61dd3b8632 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Potalej
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@936b3fc4a2d6d46d9b7fba582128cd61dd3b8632 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ncorpos_vi_py-1.0.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: ncorpos_vi_py-1.0.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 15.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c78dad0133fbd058d294349f7f1530cd7948d72734b8894c92d8fd942709b13a
|
|
| MD5 |
11bcedb9dfe3fe097d38f78a935ae1a0
|
|
| BLAKE2b-256 |
b10f796f577b47b75abf278be9d027d2bca295b5e4114c1ff9c9e62ef5aab8a1
|
Provenance
The following attestation bundles were made for ncorpos_vi_py-1.0.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
pypi.yml on Potalej/ncorpos-vi-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ncorpos_vi_py-1.0.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
c78dad0133fbd058d294349f7f1530cd7948d72734b8894c92d8fd942709b13a - Sigstore transparency entry: 775596827
- Sigstore integration time:
-
Permalink:
Potalej/ncorpos-vi-py@936b3fc4a2d6d46d9b7fba582128cd61dd3b8632 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Potalej
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@936b3fc4a2d6d46d9b7fba582128cd61dd3b8632 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ncorpos_vi_py-1.0.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: ncorpos_vi_py-1.0.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 15.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95aae3120f61be93221717de29de59ba050d7070b4e0fdccb67b794832f58286
|
|
| MD5 |
eb8d73bcbb6f49e8aa366d2b4a9b505e
|
|
| BLAKE2b-256 |
2c8e3ddbb9c4cfed7a4f8c54aea0781c814594fd999c972f25346a931f29bfea
|
Provenance
The following attestation bundles were made for ncorpos_vi_py-1.0.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
pypi.yml on Potalej/ncorpos-vi-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ncorpos_vi_py-1.0.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
95aae3120f61be93221717de29de59ba050d7070b4e0fdccb67b794832f58286 - Sigstore transparency entry: 775596832
- Sigstore integration time:
-
Permalink:
Potalej/ncorpos-vi-py@936b3fc4a2d6d46d9b7fba582128cd61dd3b8632 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Potalej
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@936b3fc4a2d6d46d9b7fba582128cd61dd3b8632 -
Trigger Event:
push
-
Statement type: