Dimensional analysis of a formula: MathS.Dimensions.Of and DimensionlessGroups
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Review the design points in the issue, then inspect the proposed implementation in Functions/Dimensions/* and Convenience/MathS.Dimensions.cs, along with Tests/UnitTests/Convenience/DimensionsTest.cs. Run the listed unit tests and compare their coverage with the stated consistency, inconsistency, and undetermined cases; the issue says a pull request will follow once the design is accepted.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What it is. Given the dimension of each variable (a map Variable → Dimension over the seven SI base dimensions, with rational exponents), say whether a formula is physically meaningful, what dimension it has, and where it stops making sense; and give the Buckingham π groups of a set of variables.
var (L, T) = (Dimension.Length, Dimension.Time);
var dims = new Dictionary<Entity.Variable, Dimension> { ["g"] = L / T.Pow(2), ["h"] = L, ["t"] = T };
MathS.Dimensions.Of("sqrt(2 g h)", dims); // Consistent: L T^-1
MathS.Dimensions.Of("h + g t", dims); // Inconsistent at h + g * t: h has dimension L and g * t has dimension L T^-1, ...
// pipe: rho M L^-3, v L T^-1, d L, mu M L^-1 T^-1
MathS.Dimensions.DimensionlessGroups(new Entity.Variable[] { "rho", "v", "d", "mu" }, pipe); // [ mu / (rho * v * d) ]
Why here. Units libraries (UnitsNet) check values; nothing in .NET checks a formula. The walk needs every node type, which the kernel has.
Design points to agree on.
- The dimension map is passed, not attached to variables, so nothing about printing, parsing or simplification changes, and the type layer of #1237 / #1019 is not pre-empted.
- Three-valued:
Consistent,Inconsistent(with the subexpression and a reason),Undetermined(undeclared variable, unread node, dimensional base to a symbolic power). Never a guess. - Nothing is simplified first:
sin(x) - sin(x)withxa length is inconsistent. - A literal
0oroofits any dimension where added or compared (v = 0). - Exponents of a dimensional base must be rational;
L^piis inconsistent.
Packaging (Packaging.md §4). No clause fires: no dependency, no floor raise, no data, composes the kernel; not on any default path, so (B) does not apply. → kernel. A UnitsNet bridge would be (D) and separate; not part of this.
Implementation, for judging the design against working code. Branch feat/dimensional-analysis, one commit on master 87a0eff: Functions/Dimensions/*, Convenience/MathS.Dimensions.cs, Tests/UnitTests/Convenience/DimensionsTest.cs (38 cases), +54 lines of PublicApi.txt. UnitTests 18335 passed / 13 skipped, FSharpWrapperUnitTests 134 passed. No existing answer moves, so no BREAKING-CHANGES entry. The pull request will follow Accepted.
Worked use, together with the shader-source feature (#2293). A water wave from ω² = g k tanh(k h): the check gives ω the dimension T⁻¹ and rejects the shallow-water typo ω = √(g k h) inside the phase; the π groups are k A, k h and g k t².
Milestone: 2.7.0 (additive).
- Ngôn ngữ chính
- C#
- Star
- 831
- Fork
- 79
- Merge trung bình
- 1 giờ 11 phút
- Pull request đã merge (30 ngày)
- 523
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ASC-Community/AngouriMath
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ASC-Community/AngouriMath#2220 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
ASC-Community/AngouriMath#2298 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The kernel under WebAssembly: 1.26 MB Brotli over the bare runtime, and 0.2 s to the first SimplifyĐang mở
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 48/100
ASC-Community/AngouriMath#2296 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
ASC-Community/AngouriMath#2293 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A Taylor expansion differentiates without simplifying, so sin(x)/x to 11 terms runs out of memoryCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
ASC-Community/AngouriMath#2291 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ASC-Community/AngouriMath
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug effort:S P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nightscout/nocturne#3219 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày