0% found this document useful (0 votes)
9 views

Screening_Tasks_OpenFOAM_GUI

Uploaded by

Coding Keeda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Screening_Tasks_OpenFOAM_GUI

Uploaded by

Coding Keeda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

OpenFOAM GUI

Project Details:
The CFD-FOSSEE team is developing a GUI application (as a Blender Addon) to alleviate the effort of
constructing OpenFOAM cases. This involves creating UI widgets to compose cel lshapes into complex multi
block geometries, graphical manipulation of solver parameters, exporting/importing OpenFOAM dictionaries
and developing ancillary features for convenient usage. With this internship, we intend to expand current
capabilities of the GUI and incorporate new features to address CFD problems of higher complexity.
Ultimately, the GUI is envisioned to be a black box that envelopes OpenFOAM to relieve the user from
defining verbose case dictionaries without compromising the extent of user control.

Qualification:
Students pursuing B.E./B.Tech/M.Tech who seek to apply their programming skills in the development of
scientific software. While having a background in Mechanical Engineering/Aerospace Engineering or related
fields with programming skills is preferable, we also consider students from other areas (CS, IT, EE, ECE etc.)
eager to partake in interdisciplinary research. Having prior knowledge of OpenFOAM and/or CFD can give you
an edge over the applicants. We encourage you to learn and implement a solution even if you do not have
prior knowledge.

Learning Resources:
1. Documentation on Blender’s Python API, application modules and standalone modules are available
on their official website.
2. Spoken Tutorials on CFD with OpenFOAM are available here.
3. There are plenty of online resources available on the internet to learn Python including Python Spoken
Tutorials.
4. Include resources about blender addon.

Minimum Skill Set:


1. Good coding skills and understanding of object oriented concepts in Python or any other Object
Oriented Languages.
2. Must be good at undergrad level applied maths.
3. Good communication skills

Preferred Skill Set:


1. Problem solving ability, writing well-structured code and implementing software design patterns.
2. Have knowledge about YAML and JSON.
3. Strong knowledge of mathematics(3D geometry, linear algebra, differential equations). 4. Sound
understanding of data structures, algorithms and have knowledge about GUI development in any tools
of their choice.
5. Must know how to use Git.

Minimum Duration:
The candidate is expected to work for at least 3-6 months in the project. To be verified
Screening Tasks:

Given below are 3 sets of screening tasks, each set focusing on a particular skillset. The candidate may
complete and submit any two out of the 3 tasks given.

Screening Task 1: Build Mesh

Make a Blender addon with the following feature sets:

Feature Set 1

1. Make an UI Panel with an input box that inputs a natural number N(<20). If a number greater than 20 is
entered, a pop-up should appear saying The number is out of range
2. Create a button withing the UI that evenly distributes N cubes (of side length = 1 blender unit) into a 2D
array of size m x n in the 3D viewport. m,n are the number of cubes along the axes of the 2D array. 3.
(Optional) Make a separate collection for the cubes that are added in the 3D viewport. 4. Add a button to
delete the selected cubes.
5. (Optional) Improve the algorithm for inserting the cubes in 2. such that the new cubes does not
ovverlap with any existing ones.

Feature Set 2

1. In the same UI as Feature Set 1, create a button which merges the selected meshes in the 3D viewport
into a single mesh.
2. To be able to merge 2 meshes, they should have at least 1 common face.
3. When merging, the common vertices are merged into a single vertex, and the common face is deleted.

Sample solutions:
Screening Task 2: Logic Nodes
Make a GUI application to simulate basic logic gates using nodes, using a framework of your choice with the
features given below. We recommend using PyQt for this task. But if any other framework is used we expect a
detailed guide for setting up the project environment along with other documents.

Features

The Main GUI should consist of a Topbar, a side panel and a main window.
The topbar has the options File, Edit and Window
File has the options New, Open, Save and Exit
New opens a new tab with the node editor interface.
Open opens the file browser and an existing file can be selected to be opened in a new
tab
Save saves the current active tab in a desired location in the computer's hard drive.
Edit has the options Undo, Redo, Cut, Copy, Paste and Delete
Window has the option to change the theme of the application
The side panel displays all the available nodes in the application.
The nodes can be drag and dropped from the side panel onto the interface.
The types of nodes to be implemented are:
Input
Input Node has an input field where the players can enter the value of the node in the text
field
Output
There are 2 types of output nodes
The normal Output node will display the net output of the node tree in ht enode itself
The write Output Node has a button on the node, which upon clicking, generates out a
.txt file as shown in the images.
And
Has 2 input sockets and 1 output socket.
Performs the action of an AND gate
Or
Has 2 input sockets and 1 output socket.
Performs the action of an OR gate
Not
Has 1 input socket and 1 output socket.
Performs the action of a NOT gate
Nand
Has 2 input sockets and 1 output socket.
Performs the action of a NAND gate
Nor
Has 2 input sockets and 1 output socket.
Performs the action of a NOR gate
Xor
Has 2 input sockets and 1 output socket.
Performs the action of an XOR gate
Xnor
Has 2 input sockets and 1 output socket.
Performs the action of an XNOR gate
In the main window, multiple node interfaces can be displayed toget in the form of tabs.

Sample Solution:

Screening Task 3: Python DSA

Write a program in your preferred language to solve the following questions:

1. Minecraft Trivia

In minecraft, water spreads horizontally and downward into nearby air blocks. Water can spread downward
infinitely until stopped by a block, and 7 blocks horizontally from a source block on a flat surface. Water
spreads at a rate of 4 blocks per second. When spreading horizontally, a weight is assigned to every direction
water can flow. For each direction, this weight is initially set to 1000. Then, for every adjacent block it can flow
into it tries to find a way down that is reachable in four or fewer blocks from the block it wants to flow to. When
found, the flow weight for that direction is set to the shortest path distance to the way down. Finally, water
spreads in the directions with the lowest flow weight.

The following table represents the way water spreads in a level plane. Each number in the cell represents the
distance of the water block from the source block.
Steve decided to test his knowledge about minecraft mechanics. He makes a grid of pillars of cobblestone,
each pillar being or different heights. He places a water source on top of one of the pillars and tries to predict
on which block the water stream would fall. Help Steve by writing a program that can predict the coordinates
of the block on which the water stream would fall.

Assume the coordinates of the first element as [0,0]

Given Input:

A 2D array grid of integers of r number of rows and c number of columns. Each element hi,j denotes
the height of the pillar at the coordinates i,j.

Coordinates coords containing the coordinates [r,c] of the pillar where the wawter source is placed.

Expected Output:

A list [i,j] which is the coordinates of the block on which the water will fall outside the grid. If there are
multiple solutions, mention any one. If there is no solution, return -1

Example:

Input:

grid = [
[ 3, 4, 6],
[ 5, 7, 1],
[ 8, 9, 1]
]

coords = [ 1, 1]

Output: [ -1, 1]

Follow-up:

For the same problem, return all the possible spots from which water might flow out of the grid along with the
time table to flow out from the respective spots.

Expected output: A list l in which each element has 2 parts, coords, which is the coordinates of the water
stream and t which is the time taken for water to reach that coorinate from the iritial source.

Example:

Input:

grid = [
[ 3, 4, 6, 4],
[ 5, 7, 1, 6],
[ 8, 9, 1, 2]
]

coords = [ 1, 1]

Output:

[
[[ -1, 1], 0.5],
[[ 1, -1], 0.5],
[[ 3, 2], 0.75],
[[ -1, 0], 0.75],
[[ 0, -1], 0.75]
]

You might also like