Java issues
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
調査の方向性
まず、文書化されている Python のインポートエントリポイント neqsim.thermo.thermoTools と、issue に示されている JPype JVM の起動設定を読みます。報告されている NeqSim JAR パスを使って提供された例を実行し、neqsim パッケージが利用可能になるか確認します。例が正常にインポートされ、相包絡線のプロット呼び出しに到達すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hello, Im trying to run a code using neqsim for plotting phase envelope of a CO2 mixture, but I keep getting the following error:
AttributeError: Java package 'neqsim' is not valid
I have in Environment Variables:
C:\Users\xxx\AppData\Local\Programs\Eclipse Adoptium\jdk-25.0.1.8-hotspot\bin
I have installed Eclipse Temurin as suggested in the description, and I have also installed jpype by using conda install -c conda-forge jpype1. I have also given the paths in the code as shown below, but I keep getting the same error: AttributeError: Java package 'neqsim' is not valid
Please help, I dont know what else to do.
import os
import jpype
import matplotlib.pyplot as plt
-----------------------------
1) JVM path (from JPype)
-----------------------------
jvm_path = jpype.getDefaultJVMPath()
print("Using JVM:", jvm_path)
-----------------------------
2) NeqSim JAR paths (from your dir output)
-----------------------------
jar_java11 = r"C:\Users\xxx\anaconda3\Lib\site-packages\neqsim\lib\java11\neqsim-3.1.3.jar"
jar_java8 = r"C:\Users\xxx\anaconda3\Lib\site-packages\neqsim\lib\java8\neqsim-3.1.3-Java8.jar"
Join them into a single classpath string
classpath = os.pathsep.join([jar_java11, jar_java8])
print("Using classpath:", classpath)
-----------------------------
3) Start JVM with NeqSim jars
-----------------------------
if not jpype.isJVMStarted():
jpype.startJVM(
jvm_path,
"-ea",
f"-Djava.class.path={classpath}",
convertStrings=False,
)
print("JVM started with NeqSim jars")
-----------------------------
4) Now import NeqSim thermo tools
(do NOT import neqsim before startJVM)
-----------------------------
from neqsim.thermo.thermoTools import *
-----------------------------
5) Build CO2–N2 mixture and plot PT envelope
-----------------------------
gas = fluid("srk") # SRK EOS
gas.addComponent("CO2", 0.7) # 70% CO2
gas.addComponent("nitrogen", 0.3) # 30% N2
gas.setMixingRule(2) # classic mixing rule
plt.figure(figsize=(8, 6))
phaseenvelope(gas, True) # True => P–T envelope plot
plt.title("P–T phase envelope – CO$_2$/N$_2$ (0.7 / 0.3)")
plt.xlabel("Temperature [K]")
plt.ylabel("Pressure [bar]")
plt.show()
- 主要言語
- Python
- スター
- 115
- フォーク
- 28
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
equinor/neqsim-python のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
equinor/neqsim-python#330 ·
-
Pandas supportオープン
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
equinor/neqsim-python#50 · コメント 7 件 ·
equinor/neqsim-python の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
Status: Triage Type: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
Objects.List treats versions=false (and similar flags) as true対応中かも @andaaron が今日担当しました。 オープンpriority: p2 type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
googleapis/storage-testbench#829 ·
メンテナーはふだん 2 日以内に返信
-
[Bug]: memory provider treats 1:1 DMs as shared surfaces, so DM turns never receive reviewed recordsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
rlaope/oh-my-hermes#2088 ·
メンテナーはふだん 1 日以内に返信