
Security News
Potemkin Understanding in LLMs: New Study Reveals Flaws in AI Benchmarks
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
This package provides realizations of advecting and dissipating blobs in up to two dimensions.
All blob parameters can be choosen freely, and multiple blob shapes are implemented. Originally, the model is developed for studying the scrape-off layer of fusion experiments, but it can be applicable to many 1d or 2d systems. See the blobmodel documentation for further details.
Examples for one and two dimensions are shown below:
1D | 2D |
---|---|
![]() |
![]() |
The package is published to PyPI and can be installed with
pip install blobmodel
If you want the development version you must first clone the repo to your local machine, then install the project in development mode:
git clone https://github.com/uit-cosmo/blobmodel.git
cd blobmodel
python -m pip install -e .
Create a grid on which the blobs are discretized using the Model
class. The make_realization()
method computes the output as an xarray dataset which can also be written out as a netcdf
file if the argument file_name
is specified. A simple example is shown below:
from blobmodel import Model, show_model
bm = Model(Nx=200, Ny=100, Lx=10, Ly=10, dt=0.1, T=20, blob_shape='gauss',num_blobs=100)
ds = bm.make_realization(file_name="example.nc")
The data can be shown as an animation using the show_model
function:
show_model(ds)
You can specify the blob parameters with a BlobFactory class. The DefaultBlobFactory class has some of the most common distribution functions implemented. An example would look like this:
from blobmodel import Model, DefaultBlobFactory
# use DefaultBlobFactory to define distribution functions of random variables
bf = DefaultBlobFactory(A_dist="exp", wx_dist="uniform", vx_dist="deg", vy_dist="normal")
# pass on bf when creating the Model
tmp = Model(
Nx=100,
Ny=1,
Lx=10,
Ly=0,
dt=1,
T=1000,
blob_shape="exp",
t_drain=2,
periodic_y=False,
num_blobs=10000,
blob_factory=bf,
)
Alternatively, you can specify all blob parameters exactly as you want by writing your own class which inherits from BlobFactory. See examples/custom_blobfactory.py
as an example or take a look at the blobmodel documentation.
Feel free to raise issues about anything. Contributions through pull requests are also very welcome. Please take a look at our Contributor guide for further details.
FAQs
Two dimensional model of propagating blobs
We found that blobmodel demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.