ccitonline.com

CCIT – Cara Cerdas Ingat Tuhan

| AI-DAI5 | CFDSOF | VisualFOAM | 8N8 | DAI5 eBook Free Download |

The Role of Prompt Engineering in CFD-PINN Applications_Mickieyo Thesanjustin_2206024474_Aplikasi CFD

Currently, Prompt Engineering is a hot phenomenon that is incredibly useful for humans to understand. We are now concerned about how AI might devour humans’ jobs in the future. But, as we are living in the present moment, let’s understand more about how we can optimize and maximize our potential by applying Prompt Engineering for our learning in fields we are interested in.

To enhance my learning in CFD with PINN, I asked ChatGPT to help me learn more about how Prompt Engineering works and what I can do to maximize my learning journey.

To share a little bit, here is the compiled version of my conversation with ChatGPT:

“In the exploration of advanced simulation techniques combining Computational Fluid Dynamics (CFD) with Physics-Informed Neural Networks (PINNs), prompt engineering emerges as a powerful productivity and ideation tool. Prompt engineering is defined as the strategic crafting of input queries or instructions to effectively guide large language models (LLMs), such as ChatGPT, in producing relevant and high-quality responses. Originating from the evolution of natural language processing (NLP), the concept has shifted from simple question-answering to becoming a core interface for interacting with powerful AI systems. In domains such as CFD and PINNs, prompt engineering can significantly aid in the formulation of PDEs, the development of loss functions, network architecture optimization, debugging, and training strategy design.

When working with PINNs in CFD applications, prompt engineering can streamline traditionally complex tasks such as deriving residuals from partial differential equations, embedding boundary and initial conditions, and creating reusable code templates for simulation workflows. For example, by prompting the AI with instructions like โ€œWrite the PyTorch code for a PINN that solves the 2D steady-state incompressible Navier-Stokes equation under no-slip wall conditions,โ€ users can rapidly obtain functional code or mathematical insights without manually deriving every component. Furthermore, prompt engineering supports debugging by enabling contextual error exploration such as identifying sources of NaN gradients or suggesting mitigation strategies for gradient vanishing issues during backpropagation in PINNs.

To enhance learning and practical application, a domain-specific prompt library was developed. It covers five major use cases: PDE formulation, architecture/loss design, training and optimization, debugging, and documentation/reporting. Prompts range from technical queries like โ€œSuggest a neural network architecture for solving a 2D Poisson equation using PINNsโ€ to analytical ones such as โ€œSummarize the results of a PINN simulation solving the 2D cavity flow with Re=100.โ€ These prompts are designed to improve both the accuracy and efficiency of modeling tasks, especially for complex, non-linear, or data-scarce flow scenarios.

Complementing the prompt library, a PyTorch-based PINN starter notebook was provided to serve as a reusable foundation for CFD simulations. The template includes a basic fully connected neural network model, a physics-informed loss function example using the Laplace equation, and a training loop that demonstrates the use of collocation points. It is structured to be easily extended for more complex cases such as Navier-Stokes simulations, time-dependent flow problems, or hybrid data-driven physics-based models.

In conclusion, prompt engineering serves as a high-leverage interface between domain expertise in fluid dynamics and the computational power of modern AI. For researchers and engineers working with CFD and PINNs, mastering prompt engineering not only accelerates development but also bridges gaps between physical intuition, mathematical formulation, and code implementation. As AI capabilities continue to evolve, integrating prompt engineering into engineering workflows will become increasingly critical for high-efficiency modeling, rapid prototyping, and scientific communication.”


Leave a Reply

Your email address will not be published. Required fields are marked *