Skip to content

Commit

Permalink
modified: ../files/default.ainp.tmp
Browse files Browse the repository at this point in the history
	modified:   edgeconfig.py
	modified:   ../../utils/create_ainpfile.py
changed to copy the edge_mesh and aboc names to /grid
  • Loading branch information
mengmengzhang2019 committed Jan 20, 2024
1 parent 957efe7 commit 22ca4e5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ceasiompy/EdgeRun/files/default.ainp.tmp
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@ VGKCONSTSCALE,R ,1,1,0
* The mesh file ( .bmsh )
*
CFIMSH,L ,1,1,0
'../grid/Edge.bmsh '
'../grid/__BMSH__ '
*
***************************************************************************
* Edge file name from the preprocessor ( .bedg )
Expand All @@ -1838,7 +1838,7 @@ CFIEDG,L ,1,1,0
* The boundary condition file ( .aboc )
*
CFIBOC,L ,1,1,0
'../grid/Edge.aboc '
'../grid/__ABOC__ '
*
***************************************************************************
* The residual file ( .bres )
Expand Down
6 changes: 5 additions & 1 deletion ceasiompy/EdgeRun/func/edgeconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ def edge_cfd(cpacs_path, cpacs_out_path, wkdir):
sym_factor = 2.0

# General parameters
# cfg["RESTART_SOL"] = "NO"
#
BMSH = edge_mesh.name
ABOC = edge_aboc.name
CREF = cpacs.aircraft.ref_length
SREF = cpacs.aircraft.ref_area / sym_factor
BREF = SREF / CREF
Expand Down Expand Up @@ -263,6 +265,8 @@ def edge_cfd(cpacs_path, cpacs_out_path, wkdir):
# create_ainp_instance = CreateAinp(get_edge_ainp_template())

create_ainp_instance.create_ainp(
BMSH,
ABOC,
UFREE,
VFREE,
WFREE,
Expand Down
4 changes: 4 additions & 0 deletions ceasiompy/utils/create_ainpfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def _write_file(self, content, output_file_withpath):

def create_ainp(
self,
BMSH,
ABOC,
UFREE,
VFREE,
WFREE,
Expand Down Expand Up @@ -68,6 +70,8 @@ def create_ainp(

# Define a dictionary for keyword-value pairs
replacements = {
"__BMSH__": f"../grid/{BMSH}",
"__ABOC__": f"../grid/{ABOC}",
"__UFREE__": str(UFREE),
"__VFREE__": str(VFREE),
"__WFREE__": str(WFREE),
Expand Down

0 comments on commit 22ca4e5

Please sign in to comment.