Git Product home page Git Product logo

onera / cassiopee Goto Github PK

View Code? Open in Web Editor NEW
16.0 9.0 11.0 213.17 MB

CFD pre- and post-processing python modules

Home Page: https://onera.github.io/Cassiopee/

License: GNU Lesser General Public License v3.0

C 40.95% C++ 35.15% Shell 0.88% Makefile 1.28% Fortran 3.22% Python 17.59% GLSL 0.45% Inno Setup 0.01% Batchfile 0.01% HTML 0.05% Assembly 0.01% BitBake 0.02% POV-Ray SDL 0.01% CMake 0.17% Cuda 0.09% Roff 0.06% M4 0.05% SAS 0.01% Smalltalk 0.01% WebAssembly 0.01%
cfd chimera immersed-boundary-method meshing post-processing pre-processing c cgns python

cassiopee's Introduction

Cassiopee 4

Computational Fluid Dynamics pre- and post-processing python modules.

-- Under construction --

Installation from binaries

Installation from sources

cassiopee's People

Contributors

alexandre-suss avatar antjost avatar bconstantmmk avatar benoit128 avatar frabasi avatar imadhammani avatar ivanmary69 avatar ljllmasterpro avatar rookievb avatar stephanieperon avatar vincentcasseau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cassiopee's Issues

Help with Paraview and CGNS files generated with Cassiopee

Hi,

I'm experiencing an issue, and I'm not sure where to post this question, so I'm trying here in the GitHub issues.

We are running simulations with Cassiopee, and I need to export snapshots to open them in ParaView for visualization, such as creating videos.

Issue 1: The contour option in ParaView is not available after opening the CGNS file. Is this a known issue? Are there additional steps or information we need to add to the file to support contour visualization?

Issue 2: How can I open a series of files and add time stamps to them in ParaView?

I am attempting the following, but ParaView does not recognize the time stamps:

This is what I am doing: initialize the time nodes on the tree...

import Converter.PyTree as C
import Converter.Internal as Int
t = C.convertFile2PyTree(input_file)
t = Int.renameNode(t, input_file, "Base")
# https://cgns.github.io/CGNS_docs_current/sids/timedep.html
n = Int.newBaseIterativeData(name="BaseIterativeData", nsteps=1, itype="IterationValues", parent=t)
Int.newDataArray("TimeValues", value=[0.0], parent=n)

and then upon runtime:

def write_snapshot(file_number: int, t: Any, mpi: bool, timestamp: float = 0.0, iteration: int = 0, restart_vars: List[str] = None):
    fname = f"snapshot{file_number:06d}.cgns" if file_number != 0 else "initial_condition.cgns"
    t_export_disk = extract_vars(t, restart_vars) if restart_vars else t
    print0(f'Writing file: {fname} at time: {timestamp:.6f}')

    BaseIterativeData = Int.getNodeFromName(t, "BaseIterativeData")
    IterationValues = Int.getNodeFromName(BaseIterativeData, "IterationValues")
    TimeValues = Int.getNodeFromName(BaseIterativeData, "TimeValues")
    Int.setValue(node=IterationValues, value=iteration)
    Int.setValue(node=TimeValues, value=round(timestamp, 8))

    if mpi:
        Cmpi.convertPyTree2File(t_export_disk, fname)
    else:
        C.convertPyTree2File(t_export_disk, fname)

Any assistance or guidance on these issues would be greatly appreciated.

Thank you!

ValidCassiopee - Global Database - Fails

Hello,
I have the following errors for some of the validation with global database:

rotatePT_t3.py:
rotatePT_t3
translatePT_t2.py:
image

The other Fails are related to diff. values in the reference & in the current.
image

I am up to date with the latest commit on 13/06/2024 & have no local modifs. to the code.
image

Issue Labeling

Hello,
Would it be possible to have access to the labeling of issues. This will allow us to properly identify the issues and filter them by type. See below for the possible types:
image
Cheers

environement problem

when loading sh_Cassiopee_local it hangs at

pyversion="python"`python -c "import sys; print('.'.join(str(n) for n in sys.version_info[:2]))"`

and I get the error 'bash: export: python: not a function'

I propose the follow bug fix that solves this issues:

if [ "$PYTHONEXE" = "python3" ]; then
    pythonTmp() { python3 "$@"; }
    export -f pythonTmp
fi

instead of

if [ "$PYTHONEXE" = "python3" ]; then
    python() { python3 "$@"; }
    export -f python
fi

I tried and it works for loading the sourcing the sh_Cassiopee_local file.

New main function names for IBMs

Hello there,

I would like to change X_IBM.prepareIBMDataPara() to X_IBM.prepareIBMData() in Connector.IBM, add an alias prepareIBMDataPara = prepareIBMData and keep the old sequential X_IBM.prepareIBMData() as X_IBM.prepareIBMData_legacy(). I would like to do the same operation for G_IBM.generateIBMMeshPara() in Generator.IBM !

In the same spirit, I would like to create (and document) a postIBM main function in Post.IBM that would encapsulate several macro functions, such as _computeSkinVariables, computeAerodynamicLoads, and computeAerodynamicCoefficients.

a+

Comments in Cassiopee - Language

Hello,
Given that Cassiopee is now 100% open-source and on github, therefore accessible to to whomever from wherever, I have a question on the language of new comments in the code. Should be stick with some in English and some in French or should we try to have all new comments be in English and thereby be consistent with the tutorials and user manual?
Cheers

Potential bug in test case Apps/IBMrotation_t1

Hello,

  • Module: Apps
  • Test case: IBMrotation_t1
  • Subtest: t1

The dimension of the Base nodes CARTESIAN_NEARBODY and CARTESIAN_OFFBODY differ in i4 and i8.
The case dimension is set to be dimPb = 2.
In i4, I get: [3, 3]
In i8, I get: [2, 3]

It may have something to do with the function Generator.IBM.generateIBMMeshPara.

Thanks,
Vincent

CGNS convention when using I8/R8

Hi

when compiling Cassiopee with I8/R8, some data are written as I8/R8 while the CGNS standard imposes I4/R4:

  • version of the CGNS library -> should be R4
  • values of Element_t nodes (type of element, nbndry) -> should be I4
  • dimension of the bases -> should be I4

for example.

Thx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.