lpm_cavity_ghia

Cavidade de Ghia (1982): u e v nas linhas centrais, do OpenFOAM e contra a tabela medida. A Large Physics Model over the design space: the geometry and the operating point in, the field on the body's surface out (u, v on 128 to 128 points per design). Domain: fluids / CFD laminar incompressível, verificado contra Ghia, Ghia & Shin (1982).

lpm_cavity_ghia v1.0.0 (revision v1.0.0) · part of the PINNeAPPle zoo · training data PINNeAPPle-Labs/lpm-cavity-ghia-heldout

Try it without installing anything: PINNeAPPle zoo demo (pick lpm_cavity_ghia: its predictions along each input with their band and where its physics checks warn or fail, and your own inputs evaluated in the browser).

Task: Cavidade de Ghia (1982): u e v nas linhas centrais, do OpenFOAM e contra a tabela medida

Inputs

Name Unit Description
aspect - design parameter of the family (bounds in validity_range)
reynolds - design parameter of the family (bounds in validity_range)

Outputs

Name Unit Description
u - the family's reference field on the body's surface points
v - the family's reference field on the body's surface points

Validity range

  • aspect: [0.7, 1.4]
  • reynolds: [100.0, 1000.0]
  • regime: inside the family's declared geometry and operating bounds

Known limitations

  • gate accuracy: failed -- relative L2 against the reference on the held-out points
  • the reference itself: solver — steady 2-D incompressible Navier-Stokes, OpenFOAM simpleFoam, verified against Ghia et al. (1982), with the assumptions it lists
  • agreement with a solver or with measured data for any geometry of this family
  • whether the ensemble spread is calibrated: it is the spread between bootstrap heads
  • behaviour outside the declared geometry and operating bounds of the family
  • the gate accuracy: failed
  • the gate conservation: not run
  • the gate boundary: not run
  • the gate residual: not run
  • the metrics shipped with this release are recomputed on a 80-design sample of the held-out set; the campaign's full-set number is under campaign/held_out_relative_l2 (80 designs)

Architecture

  • LargePhysicsModel — {"dim": 2, "n_fields": 2, "n_params": 1, "radii": [0.1, 0.4, 1.2], "n_freq": 6, "width": 128, "code": 32, "n_heads": 4, "backbone": "attention", "attn_heads": 4, "attn_layers": 2}

Physics

  • \nabla\cdot\mathbf{u}=0,\quad \left(\mathbf{u}\cdot\nabla\right)\mathbf{u}=-\nabla p+\frac{1}{\mathrm{Re}}\nabla^{2}\mathbf{u},\quad \left.\mathbf{u}\right|_{y=H}=(U,0),\quad \mathrm{Re}=\frac{UL}{\nu}

Validation

Reference: steady 2-D incompressible Navier-Stokes, OpenFOAM simpleFoam, verified against Ghia et al. (1982) -- Ghia, Ghia & Shin (1982), J. Comput. Phys. 48(3) 387-411, tabelas I e II (perfis u e v nas linhas centrais, Re 100 a 10000); OpenFOAM v2606, simpleFoam laminar, malha uniforme de 64 células por altura, resíduo 1e-6. Assumptions: laminar, incompressível, 2-D (a fatia é de uma célula com patches empty) e estacionário: a cavidade real de Ghia é um tanque 3-D e as tabelas são as do regime que já estabilizou; o perfil é comparado em 64 centros de célula, sem as duas paredes: lá o valor é a condição de contorno, e incluí-la premiaria o caso por ler o próprio dado de entrada; a verificação contra Ghia vale na razão de aspecto 1, que é a cavidade do experimento; com outra razão de aspecto o campo é do solver e a tabela não se aplica; acima de Re 1000 o solver estacionário não tem solução para achar nessas malhas, e o caso é recusado em vez de entregar um campo que parece convergido

Metric Value
heldout/relative_l2 0.08728002968450946
heldout/relative_l2_p90 0.1024570912675148
heldout/absolute_error_p90 0.03509013205766678
heldout/constant_field_baseline_relative_l2 0.9788295723133336
heldout/n_designs 80.0
campaign/held_out_relative_l2 0.08728004812243749
campaign/held_out_relative_l2_p90 0.10242922977000332
campaign/constant_field_baseline_relative_l2 0.9788636415986047
campaign/n_designs 80.0

Cost

  • trainable_parameters: 341480
  • train_seconds: 145.813
  • device: mps

Trust

Decision: REVIEW · score 0.67 · coverage 100%

  • worst of the 80 stored held-out designs: 0.2333 against the family's tolerance 0.1: falhou
  • score 0.67 abaixo do mínimo de 0.80

Published despite REVIEW: experimental tier: shipped as a reproducible base (weights, card, held-out sample, fine-tune hook) with the family's own verdict REVIEW and the measured held-out error on the card; not a verified model and not to be used as one without independent review

Training data

  • family: pp_cavity_ghia
  • dataset: lpm_cavity_ghia_heldout
  • campaign: /Users/yanbarros/lpm-campaign
  • split: {'policy': 'random by geometry, fixed by the seed: a held-out body is never a training body', 'seed': 0, 'holdout_fraction': 0.25, 'n_train_designs': 240, 'n_holdout_designs': 80, 'among_refined': [], 'n_train_geometries': 120, 'n_holdout_geometries': 40, 'locked_fraction': 0.0, 'n_locked_designs': 0, 'locked_policy': 'no locked split: the whole held-out is a validation set, and is read by the refinement round'}
  • full_dataset: {'schema': 'pinneapple.lpm.dataset/1', 'seed': 0, 'n_designs': 320, 'n_geometries': 160, 'conditions_per_geometry': 2}
  • sample: {'n_designs': 80, 'n_points': 10240, 'n_parameters': 2, 'n_neighbourhood_features': 15, 'dtypes': {'params': 'float64[2]', 'conditioning': 'float32[1]', 'points': 'float32[2]', 'normals': 'float32[2]', 'target': 'float32[2]', 'local': 'float32[15]', 'offsets': 'int64'}}

License: apache-2.0

Citation

Ghia, Ghia & Shin (1982), J. Comput. Phys. 48(3) 387-411, tabelas I e II (perfis u e v nas linhas centrais, Re 100 a 10000); OpenFOAM v2606, simpleFoam laminar, malha uniforme de 64 células por altura, resíduo 1e-6

How to use

pip install "pinneapple @ git+https://github.com/PINNeAPPle-Labs/PINNeAPPle"
import pinneapple as pp

model = pp.zoo.load("lpm_cavity_ghia")          # weights checked against their SHA-256
inputs = {"aspect": 0.822959, "reynolds": 876.861}
out = model.predict(inputs)                 # warns for inputs outside the validity range
print({k: round(float(v[0]), 6) for k, v in out.items()})
# {'u': -0.075116, 'v': 0.007798}
print(bool(model.in_range(inputs)[0]))      # inside the validity range
# True
print(pp.zoo.validate(model).decisao)        # card metrics reproduced + physics checks
# REVIEW

The inputs are the first held-out test case of the training dataset; its reference value is u = -0.082423, v = 0.00882756. pp.zoo.evaluate("lpm_cavity_ghia") recomputes every metric of the card on the stored reference.

Hosted inference

No Hugging Face inference provider can run this model, so the Hub widget is off (inference: false). It is a small PyTorch network, but its prediction is more than a forward pass: the inputs are encoded and normalised, the outputs denormalised (and, for ensembles, averaged with their spread), and every query is checked against the validity range and the model's physics checks. The pinneapple library does all of that (below); the ONNX graph carries the pre- and post-processing but not the checks; the zoo demo Space shows the model along a sweep of each input and runs it, with its checks, in your browser.

Files

File Content SHA-256
weights.pt PyTorch state_dict (torch.load(weights_only=True)), what pp.zoo.load reads a93135da729ce1d41c2a3f64b9ad87bc584df21512357d8cf94104dd4439c29d
config.json architecture and normalisation ad0f29b33a6f1e6af0733395b542c472da5c3eac7380b6688d371bedddb070ff
model_card.json the model card: inputs, outputs, validity range, metrics, trust report dbeec16d6cdd525043768fb916b7736afb948c4d6a265c016476d41044723fd6
model.safetensors the same tensors as weights.pt in safetensors format (pinneapple_hub.zoo.export.load_safetensors loads them) derived
example.json the "How to use" case: inputs, outputs, reference, verdicts derived

The SHA-256 are those of the package's manifest: pp.zoo.load refuses any other file.

Cite

If you use this model, please cite PINNeAPPle (software, Zenodo DOI 10.5281/zenodo.23343062; see CITATION.cff):

@software{pinneapple,
  author = {Barros, Yan and Schiassi, Enrico},
  title  = {PINNeAPPle},
  doi    = {10.5281/zenodo.23343062},
  url    = {https://github.com/PINNeAPPle-Labs/PINNeAPPle}
}
Downloads last month
-
Safetensors
Model size
358k params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train PINNeAPPle-Labs/lpm-cavity-ghia